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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel button

Status
Not open for further replies.

Vack58

Technical User
May 30, 2008
19
US
How to I quit the program if the user hits cancel?


Dim intRCCount, objRS

Do
intRCCount = 0
ShipTo = InputBox(Message2, Title2, "",100, 100)
strSQL10 = "Select ship_to_cd from POSHPFIL_SQL where ship_to_cd = '" & ShipTo & "'"
Call GetShipToRecordSetCount(strSQL10, intRCCount, objRS)
If intRCCount = 0 then
msgbox "Ship To Not On File",,"Quest IV"
else
'If intRCCount > 0 Then
Exit Do
End If
Loop
 
I think I figured it out.


Do
intRCCount1 = 0
PO = InputBox(Message, Title, "00", 100, 100)
if PO = "" then
wscript.quit(9)
else
PO = (right(PO + 100000000,8))
strSQL11 = "Select ord_no from POORDHDR_SQL where ord_no='" & PO & "'"
Call GetPORecordSetCount(strSQL11, intRCCount1, objRS1)
If intRCCount1 = 0 then
msgbox "PO Not on File",,"Quest IV"
else
Exit Do
End If
end if
Loop
 
Look at the script I wrote for searching for files with a user spicified extension and drive.

thread329-1578940

Hope it help you.



Thanks

John Fuhrman
Titan Global Services
faq329-6766
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top