Export to Excel

G

Guest

I would like to export data from a parameter query into excel.
I created a Macro OutputTo, selected the query and the file type.
When the data exports, I get parameter boxes asking for the date., etc.
I tried to have the macro open the form I created first so it would filter
the data before it exports, but the data is not exporting correctly. Is there
anything else I need to do?

Thank you...Wendy
 
G

Guest

Run the macro from a command button on your form. First, a user needs to
fill in the data on the form controls so the data will be there for the
query. Then your query needs to reference the controls on your table. For
example, if you are looking for a company name in your query, you will need a
text box or some other control to enter the company name. Then in the
Criteria row of the Company Name field in the query, you have to give it the
form name and the control name using this syntax:
Forms!MyFormNameHere!MyControlNameHere

If you are wanting to export to Excel, use the TransferSpreadsheet Action in
your Macro.
 

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