
Open database from VBA with different workgroup.
Quote:
>>I'm trying to open a database (through code) using a different workgroup
file.<<
I'm pretty sure you can't do this. We were talking about this further down
in a thread on manipulating objects in other databases.
The SystemDB property is read-only after Jet starts. (In Access, there is no
time when Jet isn't running, so you can't ever set this property in Access.)
Moreover, the CreateWorkspace method doesn't have an argument for the
workgroup file to use.
You can execute a command line in code which starts a second copy of Access.
The command line can have the /wrkgrp switch. Then you set an object
reference to the second instance of Access and go from there... but that
makes me feel squeamish, too. 'Cause then you have to negotiate with another
Application object, and that's not necessarily what you want...
Adam