A little programming theory crafting

lution

Registered User.
Local time
Today, 02:04
Joined
Mar 21, 2007
Messages
114
Posting this here in the VBA section since it pertains more to programming practices than database design.

I have two reports - rptInvoice, and rptEnvelope, both use qryGetPastDue as the datasource which gets all the accounts that are past due. Right now the users run each report individually from the navigation pane (Access 2007) but I'm looking for the best way to run them both at the same time. Both are in-Access reports and not mail-merge to Word since our company decided to try and save money.

One option would be to create a form and add a control that generates a recordset then feeds the recordset to each report. I'm assuming this will only run the query once. The user can print either or both as they see fit.

Another method I was thinking of using was adding VBA to the Open event of the rptInvoice report to ask the user if they want envelopes and if they say yes run the rptEnvelope but I couldn't find a way to send the same query results to the rptEnvelope without re-running the query.

Assuming past-due is based on days past due, then the odds of the invoice report and envelopes report having different results is pretty slim (not many people I know are still at work at midnight) :rolleyes: but I'd like to account for it just to be safe.


Any thoughts or suggestions?

thanks
 
You could first run a query that marks the records to be included. Then the queries for the report and envelopes would select marked records. And finally, you would un-mark the records.
 

Users who are viewing this thread

Back
Top Bottom