open query in another database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

I would like to know the code to open a query in another database from my
database, and how to run part of a module in another database from my
database.

Thanks in advance,
geebee
 
Hi,
If you really want to open the other application you could try to use
automation code e.g.:

Dim objAccess as Object
Set objAccess = CreateObject("Access.Application")
objAccess.Visible = True
objAccess.OpenCurrentDatabase "C:\YourPath\YourDB.mdb"
....

You can read more about using Access as an automation server here:

http://support.microsoft.com/kb/147816

However, you might want to consider linking to the query (file--get
external...). This way you can keep it all within one application.
HTH
Good luck
 
Back
Top