Results 1 to 3 of 3
  1. #1
    JamesP
    Guest

    When CurDir() won't work.

    Hi
    I am a in need of knowing what the current directory the database is working on. I tried to use the function CurDir(). The function didn't work because the network that I am seems to cause the return of this function to be my profile.
    Is there another way to get the current directory of a running database?

    Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: When CurDir() won't work.

    Do you mean the path of the current database project or the path to msaccess.exe or the path to the connected back end?

    The SysCmd(acSysCmdAccessDir) method can be used to return the path to msaccess.exe. In Access 97 or 2000, CurrentDb.Name will return the full path and filename of the current database; and in Access 2000, CurrentProject.path will return the path and CurrentProject.Name will return the file name. Getting the backend path is a little more complicated, because you could be linked to more than one database, or you could be using an ADO connection rather than linked tables.
    Charlotte

  3. #3
    JamesP
    Guest

    Re: When CurDir() won't work.

    Perfect![img]/w3timages/icons/starstruck.gif[/img][img]/w3timages/icons/starstruck.gif[/img][img]/w3timages/icons/starstruck.gif[/img][img]/w3timages/icons/starstruck.gif[/img][img]/w3timages/icons/starstruck.gif[/img][img]/w3timages/icons/starstruck.gif[/img][img]/w3timages/icons/starstruck.gif[/img][img]/w3timages/icons/starstruck.gif[/img]
    Once again you have made my day!

    Thanks again Charlotte!!!!!
    [img]/w3timages/icons/bow.gif[/img]

Posting Permissions

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