Howdy, Stranger!

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

Categories

get path name database

mikecoonmikecoon Member Posts: 61
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

  • mikecoonmikecoon Member Posts: 61
    Use currentDb.Name function

    mikecoon
  • splansingsplansing Member Posts: 140
    : 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.