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

AppPath in A97?

P: n/a
MLH
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
....
(I know nothing from this point)
Jan 8 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
MLH wrote in message <rg********************************@4ax.com> :
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)


I don't know anything about installation thingies, but from within
a db, you can use for instance

currentdb.name ' or dbs.name (do a msgbox to just display it)

this will return path and name to the db, so you probably need to strip
of the name part of it.

--
Roy-Vidar
Jan 8 '06 #2

P: n/a
MLH <CR**@NorthState.net> wrote in news:rg42s1pcd32hlggqco1q25vmhncija635j@
4ax.com:
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)


Public Function PathOfCurrentDB() As String
' static notion per Peter Cozens
Static Path As String
If Len(Path) = 0 Then
Path = CurrentDb.Name
Path = Left$(Path, Len(Path) - Len(Dir$(Path)))
End If
PathOfCurrentDB = Path
End Function

--
Lyle Fairfield
Jan 8 '06 #3

P: n/a


Dim dbName As String
Dim dbPath As String
Dim db As DAO.Database

Set db = CurrentDb
dbName = db.Name
dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)

--
Terry Kreft

"MLH" <CR**@NorthState.net> wrote in message
news:rg********************************@4ax.com...
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)

Jan 8 '06 #4

P: n/a
Whoops, sorry

dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)

Should be
dbPath = Left(dbName, Len(dbName) - Len(Dir(dbName)))

--
Terry Kreft

"Terry Kreft" <te*********@mps.co.uk> wrote in message
news:YY********************@karoo.co.uk...


Dim dbName As String
Dim dbPath As String
Dim db As DAO.Database

Set db = CurrentDb
dbName = db.Name
dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)

--
Terry Kreft

"MLH" <CR**@NorthState.net> wrote in message
news:rg********************************@4ax.com...
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)


Jan 8 '06 #5

P: n/a
MLH
Thx, guys. All good suggestions.
Jan 11 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.