FileDialog

  • Thread starter Thread starter Robert M via AccessMonster.com
  • Start date Start date
R

Robert M via AccessMonster.com

In my 2003 Access database I would like to allow my users to output the
results of a query to an Excel file. How do I use the FileDialog object so
that users can select an existing file to overwrite and/or save to a new
file/location?
 
You can't.

The FileDialog object does not support the SaveAs option in Access, even
though it appears to. Additionally, it requires an extra reference to the
Office library: one more that can go wrong and prevent not just that code
but the entire application from working, and another issue if you have to
move between versions. Even worse, it is not supported under the runtime
environment.

The most sensible solution is to ignore the object, and use an API call to
get the Windows FileSaveAs dialog box instead. Details in:
Call Windows File Open/Save Dialog box
at:
http://www.mvps.org/access/api/api0001.htm
 
Allen said:
You can't.

The FileDialog object does not support the SaveAs option in Access, even
though it appears to. Additionally, it requires an extra reference to the
Office library: one more that can go wrong and prevent not just that code
but the entire application from working, and another issue if you have to
move between versions. Even worse, it is not supported under the runtime
environment.

The most sensible solution is to ignore the object, and use an API call to
get the Windows FileSaveAs dialog box instead. Details in:
Call Windows File Open/Save Dialog box
at:
http://www.mvps.org/access/api/api0001.htm
 
Thanks, works great. Guess I should have heeded advice for all the previous
posters of same problem.
 

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

Back
Top