Export to Excel

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top