Check wether path exists

J

jokobe

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
 
Top