Is there a VBA equivalent to App.Path?
Printable View
Is there a VBA equivalent to App.Path?
Take a look at the Application.ActiveDocument object... it has properties that you might be able to use (Name, Path, etc)
I'm using Microsoft Access 2000 and writing some code in my data entry form. I'm trying to open another database that will be in the same folder as the database i'm using but I don't want to use an exact path name because it will be different on each computer. So, i'm trying to figure out how to use a generic path name like VB6's App.Path. Application.ActiveDocument does not exist.
I figured it out. I used CurrendDb.Name and it gives me the current database path.
Now I have another question, I'm using the replace function in my vba code. It works fine in Access 2000 but when I try it in Access 97 it doesn't work. Does anybody have any suggestions?