Close database but leave access open 
Author Message
 Close database but leave access open

Is there a way to close a database, but leave Access open (in VB).
What would be ideal is if I could close the database, then have the
window popup asking for which database you would like to open, like
when you first open MS Access.

Any help would be greatly appreciated.

-Chris



Tue, 11 Jan 2005 01:45:50 GMT  
 Close database but leave access open

Quote:
>Is there a way to close a database, but leave Access open (in VB).
>What would be ideal is if I could close the database, then have the
>window popup asking for which database you would like to open, like
>when you first open MS Access.

>Any help would be greatly appreciated.

>-Chris

If you have not denied access to the database window by turning off
the Use Special Keys property in Startup, You could use

SendKeys "{F11}"
DoCmd.Close

This will close the current db but leave Access open.

However if you then want to open another database, you would need to
select the db you want to open BEFORE you close the current file. You
could then use Michael Kaplan's TsiSOON utility (shut one open next)
to close the current file and open the selected database.

You can get the utility from his website www.trigeminal.com

Wayne



Tue, 11 Jan 2005 07:50:50 GMT  
 Close database but leave access open

Quote:

> Is there a way to close a database, but leave Access open (in VB).
> What would be ideal is if I could close the database, then have the
> window popup asking for which database you would like to open, like
> when you first open MS Access.

> Any help would be greatly appreciated.

> -Chris

to close the database and leave access open, in vb;
Application.CloseCurrentDatabase

dont know about having a prompt after the fact......
as an alternative, you can use SendKeys to open another database, but
this action can cause other problems.  you may want to look at
http://www.trigeminal.com/lang/1033/utility.asp?ItemID=8#8
it may be just what you are looking for.

hope this helps,
dingus



Tue, 11 Jan 2005 12:46:03 GMT  
 Close database but leave access open
TRY ...

Application.CloseCurrentDatabase

--
Posted via dBforums
http://dbforums.com



Tue, 11 Jan 2005 18:26:37 GMT  
 Close database but leave access open
TRY ...

Application.CloseCurrentDatabase

--
Posted via dBforums
http://dbforums.com



Tue, 11 Jan 2005 18:26:37 GMT  
 Close database but leave access open
TRY ...

Application.CloseCurrentDatabase

--
Posted via dBforums
http://dbforums.com



Tue, 11 Jan 2005 18:26:37 GMT  
 Close database but leave access open
THANK YOU!!!

Looking back, this seemed to be a stupid question. Thanks for you help though!

-Chris

Quote:

> TRY ...

> Application.CloseCurrentDatabase



Fri, 14 Jan 2005 05:09:48 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Button to close DB, but leave Access open....

2. Open Database upon closing/opening another Database

3. Leaving an Access 95 database open

4. looking for a procedure to close the current Access database and automatically open another

5. Database closes but Access 97 stays open

6. How to close all open connections to a database (DAO 3.5/Access/VB5 SP2)

7. VB6: Closing a single workbook while leaving the rest open

8. Leave recordset open, or close and reopen.

9. Leave recordset open, or close and reopen.

10. Leave messages open when Outlook closes


 
Powered by phpBB® Forum Software © phpBB Group