Challenger
Challenger

Reputation: 127

How to find filepath of open MS Access file

I have MS Access Switchboard created by my self and trying to figure it out how to find the filepath of the same one when it is open. For example if it is open in Desktop to get C:\Desktop and etc. I really do not know if it is possible at all, but if someone have an idea how to do it in MS Access vba would be very helpfull.

Thanks.

Upvotes: 0

Views: 1675

Answers (1)

madmxg
madmxg

Reputation: 359

Try use this to get current path file in vba

dim currentPath = CurrentProject.Path & "\"
dim currentFileName = CurrentProject.Name
dim fullPath = currentPath & currentFileName

Upvotes: 3

Related Questions