• database location property (2000)

    Author
    Topic
    #395810

    How can I read the database location? It isn’t listed as a database property nor is it included in the SummaryInfo Collection. Perhaps there is a better way to discover the location of the database. I want to know where the database is located so that I can attach a setup database located in the same directory then extract more information from it.

    Viewing 1 reply thread
    Author
    Replies
    • #737330

      I’m not sure what you mean by a setup database. If you want to know where the mdb itself is located, you can get at it in code by using CurrentProject.Path, which will return the folder in which the mdb lives. If you also need the name of the file, use CurrentProject.FullName. However, keep in mind that if you are doing this from *another* database, you’ll have to do it a bit differently.

      • #737485

        Thank you Charlotte. That was exactly what I was looking for.
        I’m sorry my explanation was confusing. I was sure that the explanation would be simple and that I was just using the wrong words when searching through help. I had thought that a brief explanation of my objective would help but it seems I used the wrong words there too.

      • #737486

        Thank you Charlotte. That was exactly what I was looking for.
        I’m sorry my explanation was confusing. I was sure that the explanation would be simple and that I was just using the wrong words when searching through help. I had thought that a brief explanation of my objective would help but it seems I used the wrong words there too.

    • #737331

      I’m not sure what you mean by a setup database. If you want to know where the mdb itself is located, you can get at it in code by using CurrentProject.Path, which will return the folder in which the mdb lives. If you also need the name of the file, use CurrentProject.FullName. However, keep in mind that if you are doing this from *another* database, you’ll have to do it a bit differently.

    Viewing 1 reply thread
    Reply To: database location property (2000)

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

    Your information: