PDA

View Full Version : Exporting Multiple Queries to Excel



wisdom2004
08-31-2008, 05:40 PM
Hello,

I am new to this forum and this my first post.
I have 5 queries : qry1, qry2, qry3, qry4, qry5, before i used the macro to export the data to excel in one spreadsheet using the transferspreadsheet. now i can't; because in each query there is a field added which is field date, and each time i run one query it will prompt me to type the start date and end date. i would like to have a way to prompt me one time for all the queries and save it in one spreadsheet and worksheet for each query with today's date, per example i want the spreadsheet will benamed report083108. how can i do that.

OBP
09-01-2008, 07:21 AM
Set the date in a Field on a Form and use that as the Criteria for all of your Queries. You will only have to enter the date once.
In the Criteria Row use this as the Criteria

Forms![Form Name]![Field Name]

where Form Name and Field Names are the actual names of your form and date field.

wisdom2004
09-01-2008, 10:15 AM
Thank you so much that works perfectly.