By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,052 Members | 1,303 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,052 IT Pros & Developers. It's quick & easy.

determine path to opened database

P: n/a
I'm looking for a way to find out, for instance with a system variable, the
path to the currently opened database.
The purpose is that someone can put the database on a location he or she
want's and that a piece of VBA code determines which is the path the
database is located.

Thnx in advance
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can get the path name with the follwing function:

Public Function dbPath() As String

dbPath = CurrentDb.Name
dbPath = Left(dbPath, Len(dbPath) - Len(Dir(dbPath)))

End Function
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn
Nov 12 '05 #2

P: n/a
Albert,

thnx.
This is what i'm looking for

Peter
"Albert D. Kallal" <NO************@msn.com> wrote in message
news:XLCjb.108408$6C4.28233@pd7tw1no...
You can get the path name with the follwing function:

Public Function dbPath() As String

dbPath = CurrentDb.Name
dbPath = Left(dbPath, Len(dbPath) - Len(Dir(dbPath)))

End Function
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.