Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Serbia and Montenegro (Yugoslavia)
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wont recognize App.Path

    I am trying to code the function App.Path into a module but VBA isn't recognizing it. I am assuming that I need to have a particular reference selected, but does anyone know which one?

  2. #2
    VBAMan
    Guest

    Re: Wont recognize App.Path

    Hello,

    I assume that you're looking for the path to the directory in which Access is installed.

    Access has a different way of returning the path to its installed directory:

    strPath= SysCmd(acSysCmdAccessDir)

    HTH,

    VBAMan

  3. #3
    Scott A
    Guest

    Re: Wont recognize App.Path

    App.Path is specific to VB. In Access 97, you can use CurrentDB.Name to get the full path and name of the current database. You can then use the string functions (Left, Right, Mid, InStr) to parse through to get the path and name. There's tons of sample code on websites on how to do this. Check out this page on The Access Web as an example.

    In Access 2000, you can use CurrentProject.Path to get the path and CurrentProject.Name to get the name.

    HTH

Posting Permissions

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