Attribute VB_Name = "basDatabasePath" Option Compare Database Option Explicit Function dbpath() As String ' Purpose : Show the path to the database ' Notes : uses DAO Dim db As DAO.Database Dim lngloop As Long Dim strname As String Set db = CurrentDb() strname = db.Name lngloop = Len(strname) While Mid(strname, lngloop, 1) <> "\" lngloop = lngloop - 1 Wend dbpath = Left(strname, lngloop) MsgBox dbpath, vbInformation + vbOKOnly, "Database Path" End Function