Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close a database from another

Status
Not open for further replies.

bigdars

MIS
Dec 13, 2001
29
0
0
US
I have two databases, one called db1 and the other called db2. db1 is distributed to a handful of users on their own machines. When the user closes db1, I want it to open db2, which will then close db1, so db2 can force a compact on the database on the users whenever they close. My problem is that I need to know how to close db1 from my db2 module? I have everything else done. Any assistance is greatly appreciated.
 
Try using in your code.

db1.Close
or
db2.Close

Compact can also be accomplished as part of the opening command associated with a desk top Icon. Look for "Start up CommandLine Options" in Help. "\cmd"
 
The db1.close gives me an "Object" error. I solved the problem by using the quit command in the db1 database and putting a 1 second delay in the db2 database, giving the first database time to close before the second database starts its work. I don't like to compact at opening because sometimes the databases are used all day long with lot of table manipulation and they grow very large. That large database would then reside on a users drive until they opened it. I was able to get the compact process to work successfully on shutdown. Thanks for your help. B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top