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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return the location of an open dtabase

Status
Not open for further replies.

DRH192

Programmer
Apr 25, 2005
96
GB
Does anyone know how to return the location of an open dtabase, i.e. return the location of its self.

cheers
 
CurrentProject.Path & "\" & CurrentProject.Name = CurrentProject.FullName
 
Jerry,

Does Access 97 support the currentproject object? I get an error message when I try use it. My current work around is:
currentdb.name - returns the fullname of the database including the path. But then you have to parse it if you want just the path or just the db name.

- Dan
 
And what about CurrentDB.Name ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

CurrentDB.Name is supported by Access97. That is what I am currently using. CurrentDB.Name is inferior to CurrentProject.Path because you have to write additional code to parse out the path, but this code can be easily encapsulated in a user defined function.

- Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top