Solved

Specifying Which Access DB To Quit

Posted on 2013-05-29
6
268 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 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 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

831 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