• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

Specifying Which Access DB To Quit

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
EMCIT
Asked:
EMCIT
  • 3
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
what happen when you place

docmd.quit

after the codes that opens the new db?
0
 
Dale FyeCommented:
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
 
EMCITAuthor Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Dale FyeCommented:
Batch files work, but I don't have one handy (working from iPad)
0
 
EMCITAuthor Commented:
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
 
Dale FyeCommented:
can you post your batch file syntax?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now