Results 1 to 4 of 4
  1. #1
    mscertified Guest

    How get path of executing database?

    I'd like to get the path of the current database from inside VBA.
    Is this possible?
    E.g. If my database is \\server1\Access\MyApp.mdb

    I'd like to get "\\server\Access\" somehow

  2. #2
    Ofer Guest

    RE: How get path of executing database?

    Application.CurrentDb.Name
    Will return the path + name

  3. #3
    Brendan Reynolds Guest

    Re: How get path of executing database?

    Here are two ways ...

    CurrentProject.Path

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

    The first method requires Access 2000 or later, the second will also work
    with earlier versions.

    --
    Brendan Reynolds

  4. #4
    Jerimiah33 is offline Novice
    Windows XP Access 2000
    Join Date
    Nov 2005
    Posts
    5
    try compact/repairing

    sometimes i run into this locking issue, and that seems to clear it up.

    mike

Please reply to this thread with any new information or opinions.

Similar Threads

  1. relink to relative path TXT data files
    By tobynegus in forum Programming
    Replies: 0
    Last Post: 08-19-2008, 10:10 AM
  2. Replies: 0
    Last Post: 09-11-2006, 07:11 AM
  3. Privileges problems whe executing a query
    By admaldo in forum Security
    Replies: 0
    Last Post: 04-27-2006, 07:22 AM
  4. Replies: 0
    Last Post: 04-24-2006, 06:48 AM
  5. File path name using Transfer spreadsheet
    By JohnN in forum Import/Export Data
    Replies: 0
    Last Post: 11-14-2005, 06:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums