Open File Dialog

L

Luke

I have created a form that contains a text box for
storing drive\folder\file information.
I would like to give the user the option to search for
the specific file by using Open dialog box (and thus
prevent spelling/typing errors). This will be included
in the text box OnClick event and after user selects the
correct file and closes the dialog, the drive\folder\file
path will be entered into the text box.

Any suggestions how to accomplish this are greatly
appreciated.

Luke
 
C

Cheryl Fischer

Luke,

The best way to do this is to use the code found at the following link:

Call the standard Windows File Open/Save dialog box:
http://www.mvps.org/access/api/api0001.htm

You will see that there is quite a bit of API code there, but you should not
let that concern you too much. Just copy all of it into a Public Module and
use the examples provided to call the routine and return a path and file.
 
L

Luke

Cheryl,

Thank you for your suggestion. Unfortunately I may not
be able to use it since on my first try it nastily
crashed my PC when I used Up One Level button. I
actually had to reboot to get the PC to behave normally
again (I use Access 2000 version).

Is there another option, something like the
OpenFileDialog available in VB.NET( neat and simple
option)?

Luke
 
C

Cheryl Fischer

Sorry I cannot reproduce this error for you - and I have tried. All I can
suggest is that you compile your code and see what happens. The routines
used in this code have been recommended for years and work without need for
modification in Access 97 and newer.
 

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

Top