Get backend folder path

Rachael

Registered User.
Local time
Today, 10:57
Joined
Nov 2, 2000
Messages
205
Hi All,

could someone kindly tell me how to get a folder path rather than a file path

I use this to get my backend file path:

Dim strConnect As String
strConnect = Mid(DBEngine(0)(0).TableDefs("Blocks").Connect, Len(";DATABASE=") + 1

But would like to get only the folder path ie the same as above but not containing the actual file name.

Thankyou,

Cheers, Rach
 
If you want the path and the name of the current database, then use:
CurrentDb.Name

If you want just the name of the current database, then use:
Dir(CurrentDb.Name)

Or if you want the path to the current database, then use:
Left(CurrentDb.Name,Len(CurrentDb.Name)-Len(Dir(CurrentDb.Name)))

HTH
 
Cheers ghudson, thanks for your prompt response, the mist surrounding the VB language get a little thinner as time goes on, however, I think I still need the fog light on!

Kind regards, Rach
 

Users who are viewing this thread

Back
Top Bottom