Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check current drive and directory...

Status
Not open for further replies.

Inquisitor99

Programmer
Aug 25, 2005
24
US
I need to check if a database is running from a specific drive and directory. I tried using the "CurDir" function, but that does not give me the path that the database is currently located in, it appears to give me the last path that it was located in or created in, but it does not change no matter what drive I open the database from.


Here is a sample of the code I'm using:

If CurDir="F:\DatabaseFiles" then
Msgbox "Please do not use the database from this location"
End If

Is there a different command available to check the drive and directory that the database is "currently" running under?

Thanks.
 
Excellent!!! Thanks Remou - the CurrentProjectPath is exactly what I needed. I tried it and it works like a charm no matter what drive or directory the database file is located under.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top