App.Path in vba?

How would I ask access what my DB path is? like App.Path is vb?

   - Marc
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Please try following code to find the db path:

Function FindMyFile()
Dim i As Integer
With Application.FileSearch
    .LookIn = "C:\Scratch\Data"  'Search path
    .SearchSubFolders = True
    .FileName = "*.dbf" 'Here to set the file type or name
    .MatchTextExactly = True
    .FileType = msoFileTypeAllFiles
    If .Execute() > 0 Then
        MsgBox "There were " & .FoundFiles.Count & _
            " file(s) found."
        For i = 1 To .FoundFiles.Count
            MsgBox .FoundFiles(i)
        Next i
        MsgBox "There were no files found."
    End If
End With
End Function




Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pete's suggestion is great for v2000 and above.

for 97 you can ...

Left$(CurrentDB.Name, Len(CurrentDB.Name) - Len(Dir(CurrentDB.Name)))

10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Hi Folks,

Can't you use just use and extract the lefthand side of the string?


Hi Jes,  that is what my post does ...
Hi Folks,

@Steve:  Oh, alright then, you got there first ;0)

sometimes it take a while for the system to post , catch up, email ... I get dizzy myself just following the threads sometimes :-)
MarcGraffAuthor Commented:
Thanks everyone!

   - Marc
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.