Delete/ignore a page based on field value

mafhobb

Registered User.
Local time
Today, 06:29
Joined
Feb 28, 2006
Messages
1,249
Hi

So I have a report with two pages. One page is about product exchange information and the other one payment. This report can either be printed or saved as a pdf (one pdf for both pages) and e-mailed.

This works fine, however if the item is under warranty then the exchange is for free and I do not want to print/e-mail the 2nd page (payment).

My trigger field for this is "Warranty" which can be "Yes" or "No".

How can I prevent that 2nd page from printing/e-mailing? Can it be simply skipped when the report is being created based on my field?

Thanks

mafhobb
 
Code:

This is what I use for saving the report:
Code:
            DoCmd.OutputTo acOutputReport, "rptExchfrm", "PDFFormat(*.pdf)", "\\sl-fs2\Applikationen\Productsupport_(PSPS)\PSDB\Temp\WarrantyExchange" & Trans & ".pdf", False, "", 0, acExportQualityPrint

This is what I use for printing it:
Code:
        DoCmd.OpenReport "rptExchfrm", acViewPreview, , "CallID=" & Me.CallID

mafhobb
 
Well, I got no answers so I started looking at alternate solutions and it turns out that copying the original report, modifying it and adding some code to use it in those cases worked well enough.

Mafhobb
 

Users who are viewing this thread

Back
Top Bottom