Check wether path exists

G

Guest

Hi NG,

how do I check wether a path (i.e. "f:\my_dir\my_database.mdb") exists??
(I'm working with ACC 2000)

thanks in advance

jokobe
 
N

Nikos Yannacopoulos

Jokobe,

Dir("f:\my_dir\my_database.mdb") will return the file name if the file
exists, or a zero-length string "" if not. So, you could use something like:

If Dir("f:\my_dir\my_database.mdb") = "" Then
'what to do if database does not exist
Else
'what to do if database exists
End If

HTH,
Nikos
 

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