[AccessD] Post Card Printing

Gustav Brock Gustav at cactus.dk
Thu Feb 2 10:40:39 CST 2006


Hi Mike

You will need a sequential ID for the records.
Then create a query to write a temp table:

  SELECT 
    ([Offset]+[ID])\4 AS Page4, 
    (([Offset]+[ID])\2) Mod 2 AS Column2, 
    ID AS CardID 
  INTO 
    tblCardID
  FROM 
    tblYourTable;

Use parameter Offset to adjust the sequence for full pages by setting it to the negative value of the first ID. If this is 67, set Offset to -67. You could retrieve that value first or by an in-line subquery, but I'll leave that to you.

If you set up columns to go down and then across, you can use this method.
Read and sort the table for printing the front side of the cards:

  SELECT 
    Page4, 
    Column2, 
    CardID
  FROM 
    tblCardID
  ORDER BY 
    Page4, 
    Column2, 
    CardID;

and sort this way for the rear side of the cards:

  SELECT 
    Page4, 
    Column2, 
    CardID
  FROM 
    tblCardID
  ORDER BY 
    Page4, 
    Column2 DESC, 
    CardID;

Put this code into two queries and create inner join to your original table and pull the fields you need from this to print the cards.

You may be able to skip the temp table and sort directly but it does not always work.
Also, you may later reduce the queries like this:

  SELECT 
    CardID
  FROM 
    tblCardID
  ORDER BY 
    Page4, 
    Column2 DESC, 
    CardID;

By adjusting the sorting and the across/down sequence you can create other printing sequences.

/gustav


>>> Mike.W.Gowey at doc.state.or.us 02-02-2006 16:21:32 >>>
 

I'm wondering if any one knows of a way that I can get post cards to
print from the database.  Here is what I am attempting to do but it is
not working.  I print the front of the card with the return address and
the address of the customer (4 per page).  Than what I want to be able
to do is flip the card stock over and print the customer billing data on
the back.  Currently the columns are set up to go across and than down
for printing.  Is there a way that I can get the columns to print across
the bottom and than up?  The problem is when I turn over the card stock
than the names and detail do not match up, they are backwards, because
of course when you flip the card stock over the first record is at the
bottom of the page instead of the top.

Anybody have any ideas?

Thanks in advance for any ideas,


Mike Gowey  MCSA, MCDST, A+, LME, NET+
Team Leader - SouthEast Region
Information Systems Unit





More information about the AccessD mailing list