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!

VB code to find Access mdb name?

Status
Not open for further replies.

VBAfun

Programmer
Joined
Dec 20, 2001
Messages
5
Location
US
Is there some way I can code a routine in VB to find the name of the Access .mdb that the code is executing in? The .mdb name would vary depending on what path/filename it is in and the program logic would be dependent on it - so that I do not have to rely on hardcode. I have done similiar things in ASP to get the path & filename of the executing program but I'm not sure how I would do this without a server... thanks.
 
Try:

dbengine(0)(0).name


Let me know if this helps.
 
John - dbengine(0)(0).name worked - thanks very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top