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
Solved

Specifying Which Access DB To Quit

Posted on 2013-05-29
6
275 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

808 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