Long Path of Database

aqif

Registered User.
Local time
Today, 15:01
Joined
Jul 9, 2001
Messages
158
Hi:)

I am trying to get a long path of Current database. I am using like

Msgbox(CurentDB.Name)

I have also tried FileSystemObject with Path property but every time it returns me the short path like

C:\Temp\PATHCE~1\SPLITD~1\a.mdb instead of

C:\Temp\Path Centre\Split Database\a.mdb

Any way around it?

Cheers!
Aqif
 
aqif,

Hope this helps

' For db path
Private Sub Command0_Click()
MsgBox Left(CurrentDb.Name, Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name)))
End Sub

' For db name
Private Sub Command0_Click()
MsgBox Dir(CurrentDb.Name)
End Sub

' For both
Private Sub Command0_Click()
MsgBox Left(CurrentDb.Name, Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & Dir(CurrentDb.Name)
End Sub

IMO
 
Last edited:

Users who are viewing this thread

Back
Top Bottom