App.Path in vba?

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

   - Marc
LVL 1
MarcGraffAsked:
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.

Benjamin_LukCommented:
Please try following code to find the db path:

Function FindMyFile()
Dim i As Integer
With Application.FileSearch
.NewSearch
    .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
    Else
        MsgBox "There were no files found."
    End If
End With
End Function

Regards

Ben
0
peter57rCommented:
currentproject.path

Pete
0

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
stevbeCommented:
Pete's suggestion is great for v2000 and above.

for 97 you can ...

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

Steve
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

SoggyPCommented:
Hi Folks,

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

Later,

Jes
0
stevbeCommented:
Hi Jes,  that is what my post does ...
0
SoggyPCommented:
Hi Folks,

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

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

   - Marc
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.