[AccessD] Post Card Printing

Gowey Mike W Mike.W.Gowey at doc.state.or.us
Thu Feb 2 11:32:48 CST 2006


Sorry Gustav I am lost on the first part on creating the temp table with
the Offset and ID part.

-----Original Message-----
From: Gowey Mike W 
Sent: Thursday, February 02, 2006 10:10 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Post Card Printing

Sorry replied to the wrong post.


When you say sequential ID for the records do you mean within the
customer table?  I do have a unique customer ID for each customer within
the customer table, will that work?  

-----Original Message-----
From: Gustav Brock [mailto:Gustav at cactus.dk]
Sent: Thursday, February 02, 2006 9:41 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Post Card Printing

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


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list