When I use a macro behind a command button to export a report to excel, do i first need to have the macro open the query before output. seems like it would have to be open to be output but not sure - please comment - thanks
yamy
No, you don't have to do that. The exporting process will reference the query and export the results for you. You just have to properly setup the Export command with the query as a parameter and the query will run providing the recordset to be exported. Bob Scriver
what I really meant to ask, is, will the query always export with latest data? as if it was refreshed every time? that's why i think i had to open and rerun it first.
thnks
No, the data will always be the latest. The exporting process executes the designated query, runs it to get the latest data, and then exports the data. Bob Scriver
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.