PC Review


Reply
Thread Tools Rate Thread

Close one Database while openning another

 
 
Terry
Guest
Posts: n/a
 
      18th Feb 2005
Last question was so helpful. Here is another that I have
not been able to solve and left as is for lack of
knowledge.

I have a form that is called utility. We have several
master mdb files that get used as templates for several
jobs. The utility copies the requested template(mdb file)
to a given job directory to a new provided name (name and
path are requested on the form in utitlity.mdb). The
problem is the person has to close the utility.mdb and
then locate the job directory and open the new mdb file.

Is there a procedure that would close the utility.mdb and
open the new mdb using the path and file name provided on
form in the utility.mdb?

Thanks...


 
Reply With Quote
 
 
 
 
Terry
Guest
Posts: n/a
 
      18th Feb 2005
Thought I tried this a few years ago. Maybe 2002 works
better than older versions as this time it worked with the
quit. I think in 95 you could not quit while in the vb
code if you openned another database...
Is this the proper way however???????
Dim MyAppID, ReturnValue
'open the new file
'MyAppID = Shell("C:\Program Files\Microsoft
Office\Office10\msaccess.exe Y:\Jobs\2005Jobs\205017
\NCmodel\NC-test3.mdb", 1)
Docmd.Quit

>-----Original Message-----
>Last question was so helpful. Here is another that I

have
>not been able to solve and left as is for lack of
>knowledge.
>
>I have a form that is called utility. We have several
>master mdb files that get used as templates for several
>jobs. The utility copies the requested template(mdb

file)
>to a given job directory to a new provided name (name and
>path are requested on the form in utitlity.mdb). The
>problem is the person has to close the utility.mdb and
>then locate the job directory and open the new mdb file.
>
>Is there a procedure that would close the utility.mdb and
>open the new mdb using the path and file name provided on
>form in the utility.mdb?
>
>Thanks...
>
>
>.
>

 
Reply With Quote
 
Andi Mayer..
Guest
Posts: n/a
 
      18th Feb 2005
On Fri, 18 Feb 2005 09:24:31 -0800, "Terry"
<(E-Mail Removed)> wrote:

>Last question was so helpful. Here is another that I have
>not been able to solve and left as is for lack of
>knowledge.
>
>I have a form that is called utility. We have several
>master mdb files that get used as templates for several
>jobs. The utility copies the requested template(mdb file)
>to a given job directory to a new provided name (name and
>path are requested on the form in utitlity.mdb). The
>problem is the person has to close the utility.mdb and
>then locate the job directory and open the new mdb file.
>
>Is there a procedure that would close the utility.mdb and
>open the new mdb using the path and file name provided on
>form in the utility.mdb?
>
>Thanks...
>


Shell Environ("comspec") & " /c " &chr(34) &"newDbPatrhName" &chr(34)
Application.Quit

---
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      19th Feb 2005
Check MichKa's (TSI) utility called TSI SOON (Shut One, Open New)

http://www.trigeminal.com/lang/1033/...asp?ItemID=8#8

--
HTH
Van T. Dinh
MVP (Access)


"Terry" <(E-Mail Removed)> wrote in message
news:059701c515de$b4cd8ce0$(E-Mail Removed)...
> Last question was so helpful. Here is another that I have
> not been able to solve and left as is for lack of
> knowledge.
>
> I have a form that is called utility. We have several
> master mdb files that get used as templates for several
> jobs. The utility copies the requested template(mdb file)
> to a given job directory to a new provided name (name and
> path are requested on the form in utitlity.mdb). The
> problem is the person has to close the utility.mdb and
> then locate the job directory and open the new mdb file.
>
> Is there a procedure that would close the utility.mdb and
> open the new mdb using the path and file name provided on
> form in the utility.mdb?
>
> Thanks...
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
openning my database at home that I created in my office fawdatabase Microsoft Access Security 2 31st Jan 2009 06:45 PM
Importing Excel data to database causing Database to Close. Hotwheelsrc51 Microsoft Access External Data 1 17th Jun 2008 04:48 PM
Openning a secure database is giving an error message programmer48120 Microsoft Access Security 0 22nd May 2008 04:41 PM
access opens database first time, close and retry database won't o =?Utf-8?B?Y29tcHVzZXIxMA==?= Microsoft Access 2 30th Jan 2007 04:19 PM
Database question - Database Open, Close Design =?Utf-8?B?TWFjY2E=?= Microsoft C# .NET 4 20th Sep 2005 10:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:33 PM.