Selecting drive from a form

  • Thread starter Thread starter DavidC
  • Start date Start date
D

DavidC

I have a need to be able to select a drive or directory
thorough a control on a form. I have looked for a command
simillar to excel which is Application.GetOpenFilename("XL
Files (*.XLS), *.XLS"). Unfortunately I cannot find a
comparable command in access.
Any help would be appreciated.

Regards

DavidC
 
Have you researched Application.FileSearch? It represents
the File -> Open dialog. Access Help has some examples of
how it can be used.

Hope This Helps
Gerald Stanley MCSD
 
Thanks heaps I will try this out. What I am going to do
is to select a drive or directory and find all the file
names in that location so I needed to have a dialog box to
select the drive or directory and return that as a
variable to then search for all file names in that
selected location.
Regards

DavidC
 
Thanks heaps I will try this out. What I am going to do
is to select a drive or directory and find all the file
names in that location so I needed to have a dialog box to
select the drive or directory and return that as a
variable to then search for all file names in that
selected location.

I knew a Mandeno from Auckland University Car club days
1970's

Regards

DavidC
-----Original Message-----
Hi David

You can bring up the standard Windows File Open/Save as dialog by calling
the system function in COMDLG32.DLL.

You will find some example code here:
http://www.mvps.org/access/api/api0001.htm

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

I have a need to be able to select a drive or directory
thorough a control on a form. I have looked for a command
simillar to excel which is Application.GetOpenFilename ("XL
Files (*.XLS), *.XLS"). Unfortunately I cannot find a
comparable command in access.
Any help would be appreciated.

Regards

DavidC


.
 
Hi David

DavidC said:
Thanks heaps I will try this out. What I am going to do
is to select a drive or directory and find all the file
names in that location so I needed to have a dialog box to
select the drive or directory and return that as a
variable to then search for all file names in that
selected location.

This is exactly what the dialog box does, but in one step, not two. It is
precisely the same as the File>Open dialog in other applications, so is
familiar to users.
I knew a Mandeno from Auckland University Car club days
1970's

Not me, but undoubtedly a relly :-)
 
Back
Top