Hi Folks,
I have Ms Access Application that call batch file
Shell "cmd /c ""C:\Program Files\lotmaker\manual_update.bat"",vbNormalFocus"
DoCmd.Quit to close current MS Access
while the batch it self
copy \\mansiserver\distribution\deploy\32bit2000.mdb "c:\program files\lotmaker"
copy \\mansiserver\distribution\deploy\prices.mda "c:\program files\lotmaker"
REM Re-Run lotmaker after get the new version
CD \
CD \"Program Files\lotmaker"
32bit2000.mdb
Exit
if I run the batch by itself, it will copy the files and run the latest version and close itself
but when i run it from the access , it will call the batch and it close the current access
batch will copy the files and run the latest Application but will not close itself.
cmd will stay open until i close it from X or close the access that opened recently
Any Help?
Thanks in Advance,
MM
Ms Access and closing batch file after executing
Moderator: DosItHelp
Re: Ms Access and closing batch file after executing
Try to add a CALL command.
BTW Is it true that you have to write the final quot behind vbNormalFocus?
IMO:
Regards
aGerman
Code: Select all
Shell "cmd /c call ""C:\Program Files\lotmaker\manual_update.bat"",vbNormalFocus"
BTW Is it true that you have to write the final quot behind vbNormalFocus?
IMO:
Code: Select all
Shell "cmd /c call ""C:\Program Files\lotmaker\manual_update.bat""", vbNormalFocus
Regards
aGerman
-
- Posts: 3
- Joined: 22 Jul 2010 10:57
Re: Ms Access and closing batch file after executing
thanks ,
I tried but still same,
any other suggestion
Thanks again
MM
I tried but still same,
any other suggestion
Thanks again
MM
-
- Posts: 3
- Joined: 22 Jul 2010 10:57
Re: Ms Access and closing batch file after executing
Thanks so much
It's working
It's working