Closing a form in an opened database from a different database

G

GeorgeMar

I have a database A (say) that opens database B (say). Both remain open.
Database A has a hidden form opened. I want to close the form from with
database B.

If I use .OpenCurrentDatabase, it creates a NEW instance. I presume that I
want to simply use the opened database without creating a new instance.

What is the best approach?

many thanks
george
 
D

Douglas J. Steele

Presumably you're using .OpenCurrentDatabase against an instance of the
Access Application object. How are you instantiating that instance? This is
one of the cases where you need to use GetObject, referring to the instance
that's already running.
 
G

GeorgeMar

Thank you Doug again. It worked a treat!

Douglas J. Steele said:
Presumably you're using .OpenCurrentDatabase against an instance of the
Access Application object. How are you instantiating that instance? This is
one of the cases where you need to use GetObject, referring to the instance
that's already running.
 
Top