get path name database

Okay, I created a database and placed the database in three different directories( dir a,b, and c) for people to use. Now, what I would like to do is track where people open up my database. And I want to do using a VB script associated with the form of the database. My idea is in the Form_Load function, my script gets the path name of where the database was opened and store it in a table.

Now, I tried using CurDir() but it did not do the job. Is there a way to get the path of where the database was opened? I know when you hit Save option, Access saves the database to the opened file path. How can I get the file path?
mike coon

Comments

  • Use currentDb.Name function

    mikecoon
  • : Okay, I created a database and placed the database in three different directories( dir a,b, and c) for people to use. Now, what I would like to do is track where people open up my database. And I want to do using a VB script associated with the form of the database. My idea is in the Form_Load function, my script gets the path name of where the database was opened and store it in a table.
    :
    : Now, I tried using CurDir() but it did not do the job. Is there a way to get the path of where the database was opened? I know when you hit Save option, Access saves the database to the opened file path. How can I get the file path?
    : mike coon
    :

    MyPath = Application.CurrentProject.Path

    This will give you the entire path.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories