outputto query first?

  • Thread starter Thread starter MER
  • Start date Start date
M

MER

in my output to action I am having a report dumped into a
text file.

The source for the report is a query.

The user will just click on a command key to have the data
dumped to the textfile.

do I have to build, underneath the command key, Visual
Basic DoCmd.openquery acquery, then DoCmd.close to run the
query first to gather "the latest data", then
runDoCmd.outputto?

DoCmd.acquery
Docmd.close
Docmd.outputto

Or is just executing outputto (as a macro or VB) alone
going to automatically "give the report" the latest data
to work with?

simply Docmd.outputto or place the macro under the button?
 
Mer,

There is no need to open or run the query. A report based on the query
will show the current data, and the OutputTo action/method will also
output the current data.
 
Back
Top