A
ats
Trying to query a table in another access database in the same
directory, but Access defaults to the User's logged in directory
instead of the current database's directory.
I've tried to construct the query by assembling the file, name but I
get a syntax error.
Example:
SELECT name
FROM tbName
IN
Mid(currentdb.name,1,Len(currentdb.name)-Len(Dir(currentdb.name)))&"dbNames.mdb"
The text after the "IN" constructs the full filename with path. The
function "currentdb.name" has the complete path & filename of the
current database, and I'm just stripping it off and attaching it to the
desired database name.
directory, but Access defaults to the User's logged in directory
instead of the current database's directory.
I've tried to construct the query by assembling the file, name but I
get a syntax error.
Example:
SELECT name
FROM tbName
IN
Mid(currentdb.name,1,Len(currentdb.name)-Len(Dir(currentdb.name)))&"dbNames.mdb"
The text after the "IN" constructs the full filename with path. The
function "currentdb.name" has the complete path & filename of the
current database, and I'm just stripping it off and attaching it to the
desired database name.