Finding path which working currently mdb

  • Thread starter Thread starter guiderec
  • Start date Start date
G

guiderec

Guest
Hi,

I need to help immediately. I search about finding pth which currently open MDB file's but help didn't helped me.

Im a new programmer on Access&Visual B.

please help me.

Thanks.

If you'll send mail tome i ll be thanksful you.
Recai YAGLI : yaglir@hotmail.com
 
Dim db As DAO.Database
Dim strPath As String
Dim intCharacter As Integer

Set db = CurrentDb

strPath = db.Name
intCharacter = InStrRev(strPath, "\")
strPath = Left(strPath, intCharacter)

'Use this code block to retrieve the path or the current database.
 
For Access 2000 you can use:

CurrentProject.Path

For Access 97 you can use

CurrentDb.Name

Easier than the code above :-)

BL
hth
 
The code I provided will remove the database name and provide you with ONLY the directory structure. bob's will include the db name at the end.
 
Actually, the CurrentProject.Path will give only the directory, CurrentProject.FullName will give the path AND the name (A2K).

I guess you'd have to use the code to get the name for an Access97 Db.

BL
 

Users who are viewing this thread

Back
Top Bottom