Query feeding report/date sensitive

KindleFire

Registered User.
Local time
Today, 08:07
Joined
Jun 11, 2001
Messages
18
I have a query which feeds a report and I need to modify it or create another which will show all items which have been closed out since the last time I ran the report, which is basically every ten days. So if I opened the report today the query should mathmatically go back ten days and show all items closed out for only those last ten days...Any help?
 
I would suggest putting something in either the report's OnOpen or OnPrint (probably better) event that stores the LastPrinted date in a separate table. Then in the form or control where you go to open the Report, use that date to filter out already-printed entries. This idiot-proofs your system rather than relying on people to open it every 10 days.

HTH,
David R
 
The only problem with using the on open event for a report to supply the print date is that the report might not actually print.
 
True, Rich. However I create lots of reports that I never actually have to have a hard copy of, so in some cases OnOpen will work. OnPrint is usually better, but the original poster may didn't specify that it was printed, only ran.

David R
 

Users who are viewing this thread

Back
Top Bottom