Thread View: comp.databases.ms-access
5 messages
5 total messages
Started by Yves
Thu, 08 Apr 1999 00:00
Simple one! Get path?
Author: Yves
Date: Thu, 08 Apr 1999 00:00
Date: Thu, 08 Apr 1999 00:00
7 lines
1313 bytes
1313 bytes
How can I get the path of my .mdb. Like in Excel it's
Workbooks("Application.xls").Path, but I don't know what's the same in
Access
Thanks!!!
Yves
Re: Simple one! Get path?
Author: Arvin Meyer
Date: Thu, 08 Apr 1999 00:00
Date: Thu, 08 Apr 1999 00:00
17 lines
1453 bytes
1453 bytes
The quick way is:
CurrentDB.Name
-----
Arvin Meyer
onsite@esinet.net
Yves wrote in message ...
>How can I get the path of my .mdb. Like in Excel it's
>Workbooks("Application.xls").Path, but I don't know what's the same in
>Access
>
>Thanks!!!
>
>Yves
>
>
Re: Simple one! Get path?
Author: Abbot Cooper
Date: Thu, 08 Apr 1999 00:00
Date: Thu, 08 Apr 1999 00:00
18 lines
1584 bytes
1584 bytes
Use CurrentDb.Name and parse out the actual name of the db in order to get
just the path.
Abbot Cooper
cooper_NoSpam_ab@mediaone.net
(remove "_NoSpam_" from address when sending)
Yves wrote in message ...
>How can I get the path of my .mdb. Like in Excel it's
>Workbooks("Application.xls").Path, but I don't know what's the same in
>Access
>
>Thanks!!!
>
>Yves
>
>
Re: Simple one! Get path?
Author: Radu Lascae
Date: Thu, 08 Apr 1999 00:00
Date: Thu, 08 Apr 1999 00:00
37 lines
1904 bytes
1904 bytes
Hi Yves,
This code was first posted by David McTavish.
Function GetDBDir()
'returns the path to the current database
Dim db As Database 'database object
Dim tPath As String 'temporary path
'configure the database object
Set db = CurrentDb
'set the temporary path the path to the database
tPath = db.Name
'loop through the temporary path and truncate to each backslash (\)
Do While InStr(tPath, "\") > 0
GetDBDir = GetDBDir & Left(tPath, InStr(tPath, "\"))
tPath = Right(tPath, Len(tPath) - InStr(tPath, "\"))
Loop
'close the database object
db.Close
End Function
Hth,
Radu
Yves wrote:
> How can I get the path of my .mdb. Like in Excel it's
> Workbooks("Application.xls").Path, but I don't know what's the same in
> Access
>
> Thanks!!!
>
> Yves
Re: Simple one! Get path?
Author: Nirmala Sekhar
Date: Fri, 09 Apr 1999 00:00
Date: Fri, 09 Apr 1999 00:00
29 lines
1823 bytes
1823 bytes
Set Db = CurrentDb
strtemp = Dir(Db.Name, vbDirectory)
strdir = Left(Db.Name, InStr(1, Db.Name, strtemp) - 1)
' db.name will give you complete path and file name
' strtemp will give you only the file name
' strdir will give you only the path
Nirmala Sekhar
-----------------------------------------------------
Monthly newsletter on Microsoft Access at
http://www.saicomsystems.com/index.asp?id=tips
Fortnightly newsletter on motivatioval quotes
http://www.saicomsystems.com/index.asp?id=mind
******************************************************
On Thu, 08 Apr 1999 15:41:42 GMT, "Yves"
<yvaillancourt@cegepsth.qc.ca> wrote:
>How can I get the path of my .mdb. Like in Excel it's
>Workbooks("Application.xls").Path, but I don't know what's the same in
>Access
>
>Thanks!!!
>
>Yves
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads