Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231

    Unhappy Unanswered: How can I find the path to the Access application - [RESOLVED]

    In VB6, i could use application.path to retrieve the working directory of the vb6.exe (or whatever the file name was). Is there a way to detect that in MS Access? On the network here, people have different names of their files (i.e. some people are using Access2k.exe while others use access.exe and msaccess.exe, etc.). Anybody know a way (like CurrentDb.Name) to detect the working directory of the current Access application (preferably without a ton of API mess)? Thanks for the help.
    Last edited by jmahaffie; 02-25-05 at 15:26. Reason: Resolved

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Inspiration Through Fermentation

  3. #3
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    Not sure what you're asking, but

    currentproject.path - for the db path (a2k + versions)
    currentproject.name - for only the name of the db
    currentproject.fullname - for full path and name of the db

    syscmd(acsyscmdaccessdir) - for where access resides
    Roy-Vidar

  4. #4
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231
    Thanks, both of you. The utility at the site RedNeckGeek sent is pretty cool, but the syscmd(acsyscmdaccessdir) that RoyVidar sent is precisely what I'm looking for. I needed that to build a shortcut for the users, since some people have their MSAccess.exe file in different directories. Thank again for the help!

  5. #5
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    Another way:

    Left (CurrentDb.Name, Len(CurrentDb.Name - Len (Dir(CurrentDb.Name)))

    will do the same job

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •