Is there a way to find out thru VB code what the folder is that a MDB that is currently running is in? I am trying to access another MDB is the same folder and need to know the path.
CurrentDb.Name will return the entire path of your current db. Given the fact you know the name of the current db you could pars out or replace the current db name with blanks and keep the application path.
i.e. (pardon the crudeness here)
Knowing that my current database is called db8.mdb then
Private Sub Command0_Click()
Dim stPath As String
stPath = CurrentDb.Name
stPath = Replace(stPath, "db8.mdb", "")
MsgBox stPath
End Sub
YOu should get a msgbox that has the path including the last backslash and then append your new db name.
Andy Baldwin
"Testing is the most overlooked programming language on the books!
Thats what I originally thought but on my current system it returned nothing. Afterall that is the better answer. Just tried it on my older system (access2k) and it worked.
Andy Baldwin
"Testing is the most overlooked programming language on the books!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.