Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to excel

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
GB
Hi i am having problems creating an excel file from access with critera...


The file is created ok but none of the filters are present all records are in the file..

This is my crit...

crit = strWhere


This is my command which works ok...

DoCmd.OutputTo acOutputQuery, "Autoroute", acFormatXLS, , True

How can i get it to export to excel with the filters?

Kindest regards,

Brian
 
I think you need to build your where clause into the query.


Randy
 
thanks for the reply, have you an example on how to do this???

many thanks

brian
 
Code:
SELECT * FROM [i]YourTable[/i] WHERE [i]criteria[/i]

Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top