?
Solved

Specifying Which Access DB To Quit

Posted on 2013-05-29
6
Medium Priority
?
292 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39204701
what happen when you place

docmd.quit

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

Expert Comment

by:Dale Fye
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 48

Expert Comment

by:Dale Fye
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 48

Accepted Solution

by:
Dale Fye earned 2000 total points
ID: 39217110
can you post your batch file syntax?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Suggested Courses

777 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