dbTalk Databases Forums  

open database from another database

comp.database.ms-access comp.database.ms-access


Discuss open database from another database in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Easter
 
Posts: n/a

Default open database from another database - 04-25-2006 , 08:17 PM






I'm struggling with this, and I'm sure there's a way to do it. I would like
to automate the back-up of an Access application to a writeable CD drive.
I've got the process of creating a folder on the CD with the back-up date
done, and I can copy the database objects (there are four MDB files in
total) to the CD. All of that works.

Here's my problem: because Access databases cannot be copied when they are
open, I need to have my CD writing code in a new MDB, and will need to
launch the new CD writing MDB from within one of the existing databases.
I've done this kind of thing before, but I don't have the slightest
recollection on how I did it (used to be you had to do that kind of thing
in order to compact/repair through automation).

So, I give up. How do you launch Access from within Access???

Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: open database from another database - 04-28-2006 , 05:04 PM






Well this will do it:
Dim i As Variant
i = Shell("msaccess d:\persprop\CSCPP.mdb")

Just put in your own db path.
But this does come up with the warning that requires you to click to
get into to the db (in 2003). If you know how to get by that I'd like
to know.
You could put the function in a macro and then close the db stat
started the new one.

Good luck
Ira Solomon

On Tue, 25 Apr 2006 20:17:10 -0500, Mike Easter <username (AT) domain (DOT) com>
wrote:

Quote:
I'm struggling with this, and I'm sure there's a way to do it. I would like
to automate the back-up of an Access application to a writeable CD drive.
I've got the process of creating a folder on the CD with the back-up date
done, and I can copy the database objects (there are four MDB files in
total) to the CD. All of that works.

Here's my problem: because Access databases cannot be copied when they are
open, I need to have my CD writing code in a new MDB, and will need to
launch the new CD writing MDB from within one of the existing databases.
I've done this kind of thing before, but I don't have the slightest
recollection on how I did it (used to be you had to do that kind of thing
in order to compact/repair through automation).

So, I give up. How do you launch Access from within Access???

Reply With Quote
  #3  
Old   
Mike Easter
 
Posts: n/a

Default Re: open database from another database - 04-30-2006 , 02:20 PM



Ira, you're a lifesaver! I launched the application using shell followed
by a DoCmd.Quit, then forced the new form to take center stage when
opened (http://support.microsoft.com/?kbid=210500). Works like a charm!
Thanks much!!!

Ira Solomon <isolomon (AT) solomonltd (DOT) com> wrote in
news:c645529s2m1mc35b1t13gsggoh69mbdsdf (AT) 4ax (DOT) com:

Quote:
Well this will do it:
Dim i As Variant
i = Shell("msaccess d:\persprop\CSCPP.mdb")

Just put in your own db path.
But this does come up with the warning that requires you to click to
get into to the db (in 2003). If you know how to get by that I'd like
to know.
You could put the function in a macro and then close the db stat
started the new one.

Good luck
Ira Solomon

On Tue, 25 Apr 2006 20:17:10 -0500, Mike Easter <username (AT) domain (DOT) com
wrote:

I'm struggling with this, and I'm sure there's a way to do it. I would
like to automate the back-up of an Access application to a writeable
CD drive. I've got the process of creating a folder on the CD with the
back-up date done, and I can copy the database objects (there are four
MDB files in total) to the CD. All of that works.

Here's my problem: because Access databases cannot be copied when they
are open, I need to have my CD writing code in a new MDB, and will
need to launch the new CD writing MDB from within one of the existing
databases. I've done this kind of thing before, but I don't have the
slightest recollection on how I did it (used to be you had to do that
kind of thing in order to compact/repair through automation).

So, I give up. How do you launch Access from within Access???



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.