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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a "Save As" window

Status
Not open for further replies.

djmc

Programmer
Jun 12, 2002
179
CA
I have code which converts a query to XLS format.

DoCmd.OutputTo acOutputQuery, "QUERY_NAME", acFormatXLS, "C:\DIRNAME\FILENAME.xls"

I would like to know how I can create a "Save As" text field/button so that I can have the user choose which directory they want the file in and pass the variable it into that line of code instead of having the directory being static.

 
If you omit the directory "C:\DIRNAME\FILENAME.xls"
from your code, when the code is run, a window is automatically opened to allow selection of a directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top