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

Current Directory

Status
Not open for further replies.

JaySang

Technical User
Jun 26, 2003
43
CA
I have created a link to another database using a macro. However it requires me to enter the full path to this database. I was wondering if there is anyway of coding it so that to looks in the current directory for the file.
 
can you do it with runcode in a macro. And if so what code would I use.
 
This expression will return your current database's path:
Code:
Left( CurrentDB().Name, Len(CurrentDB().Name) - Len(Dir(CurrentDB().Name) )

 
CurrentProject.Path also returns the path
of the current database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top