Solved

Specifying Which Access DB To Quit

Posted on 2013-05-29
6
244 Views
Last Modified: 2013-06-28
I have one application that opens, makes a copy of another mdb, pastes it to the user's desktop, opens the new mdb and then I need the first app to quit. How can I specify which app I want to close?
0
Comment
Question by:EMCIT
  • 3
  • 2
6 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 39204701
what happen when you place

docmd.quit

after the codes that opens the new db?
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39204856
How are you opening the new db?  I use code simlar to:

If FileExists(strLocalPath & strLocalFile) Then Kill strLocalPath & strLocalFile

FileCopy strNetworkPath & strlocalFile, strLocalPath & strLocalFile

Application.FollowHyperlink strLocalPath & strLocalFile

DoCmd.Quit

All of this is located in the Open event of a form in my "Version control" application.
0
 
LVL 11

Author Comment

by:EMCIT
ID: 39211547
It is behaving oddly. The original mdb opens, copies the new db, pastes it to the desktop and launches the new db but then seems to launch itself again. Any suggestions for something other than an mdb to copy and launch the new file? A batch file or something else?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39211666
Batch files work, but I don't have one handy (working from iPad)
0
 
LVL 11

Author Comment

by:EMCIT
ID: 39216003
I created a batch file that does what I need it to do but ..... when the cmd runs it stops and asks
"Does the path specify a file name or directory name on the target (F=file, D=directory)?
How do I modify the command to know it is a file?
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39217110
can you post your batch file syntax?
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now