• How to get mdb path and filename in VBA

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How to get mdb path and filename in VBA

    Author
    Topic
    #465006

    I’ve done several quick searches on this but have come up empty, so far.

    How do I get the current mdb path and filename in VBA? I want to display that info on several forms.

    Example: If the file I’ve opened is abc.mdb, I would like to display that name (and full path) on several forms.

    Thanks in advance.

    Viewing 1 reply thread
    Author
    Replies
    • #1192863

      You can use

      CurrentDb.Name

      or

      CurrentProject.FullName

      Both return the full path and filename of the active database.

    • #1192901

      Thanks, Hans.

      The currentproject.fullname works perfectly.

    Viewing 1 reply thread
    Reply To: How to get mdb path and filename in VBA

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: