outputto query first?

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?
 
S

Steve Schapel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top