Query to Excel Sheet with File Save as Box

Moses76

Registered User.
Local time
Today, 17:58
Joined
May 25, 2011
Messages
49
I have a query for a database on the shared drive . I want to export this to excel and prompt the user to give the user a file save as box so that he can save it anywhere he wants.

Any ideas how this can be acheived?
 
If you use the DoCmd.OutputTo function then this should do it for you:

DoCmd.OutputTo acQuery, "QueryName", acFormatXLS
 
I created a folder on C drive called test and saved it there . Does not show any files.

any ideas whats going on ? I even created a file and overwrote it but does not show a file at all.
 
I think the syntax is..
Code:
DoCmd.OutputTo ac[B]Output[/B]Query, "QueryName", acFormatXLS
 
I tried that as suggested by one of the other replies . It comes up with a file output to box and when I hit ok - It does not output any files.
 
My bad. Works ok now . However I realised that the totals for each column that I need wont show with an export to excel . Is there a way I can sum up the totals.. I have been using a report with textboxes to show the totals . Thanks already for your help so far.
 
Also how can I get this to export to .xlsx?
 
To export to .xlsx use this:

DoCmd.OutputTo acQuery, "QUERYNAME", acFormatXLSX
 

Users who are viewing this thread

Back
Top Bottom