Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling Call Execution

Status
Not open for further replies.

toccata

Programmer
Jun 26, 2002
65
US
The following code calls the Crystal Report Engine:

stAppName = "C:\WinTBM\rptProcReg.exe"

Call Shell(stAppName, 1)

Response = MsgBox("Do you want to update the Procedure Register?", vbQuestion + vbYesNo + vbDefaultButton2 + vbMsgBoxSetForeground, "The Bloodstock Manager")

If Response = vbYes Then

UpdateProc

Response = MsgBox("Procedure Register Updated", vbOKOnly, "The Bloodstock Manager")
End If

My problem is the msgbox "Do you want to update...." appears before the called report has run and terminated. I want to enforce that the report is run and the msgbox does not appear until the .exe has terminated.

 
Hi

As far as I know there is no way to do this with shell, from Access help, I quote:

"Note The Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed."

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi!

Found something that might offer a different solution than the shell at the end of this thread thread705-667547

HTH Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top