Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access VBA Modules
Interactivity between2 instances of Access
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Albert D.Kallal, post: 8250003"] Ok...sorry for not getting back...my newsreader missed this.... And, your explain was ok...I just miss understand it..(my fault). ok...above sounds good... No, don't have golive close the FE. You are MUCH better to have your front end modify as per your current step one, and then shell to the golive, and have the FE do a quit FROM THE FE..... (it is more difficult to have one application shut down and close the other... so, we don't do this - code running, or any type of dialog prompt would prevent this anyway.....) To launch the golive from the front end...go q = """" strCurrentDir = CurrentProject.path & "\" ' path to msaccess is required here strShellProg = q & SysCmd(acSysCmdAccessDir) & "msaccess.exe" & q & " " ' path to current dir...and upgrade... strShellProg = strShellProg & q & strCurrentDir & "GoLive.mdb" Shell strShellProg, vbNormalFocus application.Quit note that you need to have your golive wait a few seconds while the above shuts down... 'lets wait for 4 seconds for other copy of ms-access to exit... For i = 1 To 20 DoEvents Call sapiSleep(100) Next i The above uses the api sleep as to not waste proessing, so, the api in a standard module is: Public Declare Sub sapiSleep Lib "kernel32" _ Alias "Sleep" _ (ByVal dwMilliseconds As Long) You don't likey need 4 seconds...but at least 1, or 2 should be in the loop.... Another way would be wait until the .ldb locking file disappears.... So, as far as I can tell, you a) do not want to copy any file that is currently open....too risky b) you need to be sure that the FE is exited fully before your golive code starts running, or at least have the golive code wait until the FE is fully shutdown.... -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada [email]pleaseNOOSpamKallal@msn.com[/email] [URL]http://www.members.shaw.ca/AlbertKallal[/URL] [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access VBA Modules
Interactivity between2 instances of Access
Top