Access VBA Duplex Printing

theviper

New member
Local time
Today, 15:07
Joined
Oct 3, 2008
Messages
5
Hello,
I recently bought a new duplex printer and would like to print my invoices with the Terms and Conditions on the back in one procedure.
I was already using an access-database (Access 2007) for making and printing my invoices with two reports: rptInvoice and rptTerms, but I had to print the invoice and the terms and conditions in 2 steps.
Step 1:
Via a form where I can select the period, customers, ... I add the to be printed invoices into a temporary table.
When I click on "print", everye invoice in the temprary table will be printed seperately via the following procedure:
Do While Not rst.EOF
DoCmd.OpenReport strDocName, acViewNormal, , strLinkCriteria
rst.MoveNext
Loop
So when I need to print for ex. 10 invoices, this procedure creates 10 print tasks. I suppose this is my problem, and I have to put the 10 invoices into 1 print task.
Step 2:
I put the invoices again in the printer and print the terms and conditions on the rear side.
Using VB what would be the easiest way for me to tell Access to print the Terms and Conditions on the back of each page, in 1 print task?

I've already added a new printer and changed the default settings of that printer to duplex, and the report properties set to print to this new printer.
Can somebody help me?
Thanx !!
 
i read you but i'm not pleased .
your problem is 100% lack of report designing concepts.

1st you can easily make report display multiple invoices via grouping:
(View >> Sorting and Grouping >> choosing field expression to group on [your_invoice_id_field_here] >> enabling headers and footers for [your_invoice_id_field_here] >> set footer propert "Force New Page" to "After Section")
and then just use report's Filter property / Link Criteria to include all invoice ids you want to print ([your_invoice_id_field_here] = 1 or [your_invoice_id_field_here] = 2 ... etc.).

2nd just use page footer section to display back page of invoice (terms and conditions) and force new page after its section as well.

Finaly simple tweaks to insure layouts of both pages are within printable areas and you're set.

Now you have a single report to print with multiple 2 sided invoices and vba didnt set a foot in it...

best regards
 
Last edited:
i read you but i'm not pleased .
your problem is 100% lack of report designing concepts.

1st you can easily make report display multiple invoices via grouping:
(View >> Sorting and Grouping >> choosing field expression to group on [your_invoice_id_field_here] >> enabling headers and footers for [your_invoice_id_field_here] >> set footer propert "Force New Page" to "After Section")
and then just use report's Filter property / Link Criteria to include all invoice ids you want to print ([your_invoice_id_field_here] = 1 or [your_invoice_id_field_here] = 2 ... etc.).

2nd just use report footer section to display back page of invoice (terms and conditions) and force new page after its section as well.

Finaly simple tweaks to insure layouts of both pages are within printable areas and you're set.

Now you have a single report to print with multiple 2 sided invoices and vba didnt set a foot in it...

best regards

Nightmayor,

I've put the terms and conditions in the report footer, but I get one report with 10 invoices and on page 11 I get a page where the terms and conditions are displayed in the details section. So on page 11 also the page header, page footer, details are displayed. I've forced new page after its section in the reports footer.

So I guess I've got still 2 problems:

1) In the report (including the 10 invoices) the terms and conditions should come after every invoice: page 1=invoice, page 2=terms, page 3=invoice, page 4=terms, ...

2) the page with the terms and conditions may not contain any other date (page header/footer / details, ...), but only that what's in the report footer.
 
if you want t&c on the back i would be inclined to put the T&C in word, or something, and preprint your invoices ready for later single sided use

for one thing, you can probably get smaller fonts in word, compared with Access
 
sorry theviper , what i meant was page footer not report :)
(will edit my post to inflict that)
 
as for your other concern .. why do you need header and footer for in you terms and conditions ??
 
gemma , i've met organizations that saved millions out of living by the day and shortning their supply of stationaries , maybe thats his case :)
 
sorry theviper , what i meant was page footer not report :)
(will edit my post to inflict that)

But in the page footer is already some data like invoice total, TVA, etc. How can I just add the T&C after the invoice total etc??

You can't set the properties of a page footer to force a new page after its section, you can only do this with a report footer.
 
as for your other concern .. why do you need header and footer for in you terms and conditions ??

No I don't need header/footer in my terms and conditions. I meant that on the page where the T&C are printed, the header and footer of my invoice are still shown. So indeed the page containing the T&C should only have a details section.
 
But in the page footer is already some data like invoice total, TVA, etc. How can I just add the T&C after the invoice total etc??
move those to group footer , that's your current page footer now since it breaks into another page.
You can't set the properties of a page footer to force a new page after its section, you can only do this with a report footer.
dont you worry usualy a report footer force a new page on its own :)
 
yes, but i cant imagine printing duplex is easy, and it just limits your choice of printer

so pre-print the t&c on plain paper, and load that stationery when you want to print invoices - that doesnt mean you are wasting paper - You could even have your invoices pre-printed with T&C - in that case it is duplicating stationery, but depending on the qty it might be cheaper (and faster) than using your own ink
 
printing in duplex is fairly easy , it's like printing on 2 pages , the printer driver does all ! :)
 

Users who are viewing this thread

Back
Top Bottom