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 Rhinorhino 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
Joined
Jun 26, 2003
Messages
43
Location
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.
 
You can't do that using a macro. Using VBA it is possible, though.
 
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