Exporting Queries

leighms

Registered User.
Local time
Tomorrow, 01:32
Joined
Sep 21, 2011
Messages
37
Hi
I have recently set up a button that exports mutliple queries to one Excel file, using TransferSpreadsheet code. This works great and saves a lot of time, the only thing is on many of the queries I have a date range set, so you have to enter a date range to get the results.
Is there away that once I press the button I enter the date range once and than it exports the rest of the data based on this range, rather than entering the same dates multiple times
 
If you set the date range in fields on a form - suggest the one that has the export button on it - you can then modify the query to refer to these rather than a prompt i.e.

replace [Enter Start Date] with

Forms!ExportForm!StartDate

Where ExportForm is the name of your form and StartDate is the name of the control on your form
 

Users who are viewing this thread

Back
Top Bottom