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

How to find name of mdb file? 1

Status
Not open for further replies.

hstijnen

Programmer
Joined
Nov 13, 2002
Messages
172
Location
NL
Hi,

How can I find in VBA for Access the name of the .mdb file I'm working in?

Thanks

Henk
 
currentdb.name

Have fun! :o)

Alex Middleton
 
Or use currentproject.name (no need to strip of the path)

Roy-Vidar
 
This may also be helpful in other cases to find the back end name:

dim strPathAndFile
strPathAndFile = CurrentDb.TableDefs(mLinkedTableName).Connect
strPathAndFile = Mid(strPathAndFile, 11)

where mLinkedTableName is the name of a linked table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top