fiogf49gjkf0d Hi all.
I have a form in SLX LAN v7.2.1. that has the script below in the ButtonClick event. The problem is that the EXIT SUB line is not working, it keeps the form open. I've used this in other forms and it closes the form once it hits that line. What am I doing wrong? Thank you in advance!
Dim objSLXDB4 Dim objRS4 Dim sql_DeliveryStatus Set objSLXDB4 = New SLX_DB Set objRS4 = objSLXDB4.GetNewRecordSet If CheckboxFax.Text = "T" Then sql_DeliveryStatus = "SELECT t2.ACCOUNTID, t2.Delivery_Status FROM Table1 t1 INNER JOIN Table2 t2 ON t1.ACCOUNTID = t2.ACCOUNTID WHERE t2.Carrier = '" & cmbCarrier.Text & "' AND (t2.C_Carrier_HEADER_ACCOUNTID = '" & txtCarrierHeaderID.Text & "') AND (t2.DELIVERY_STATUS = 'Ready') AND (t2.PROMO_FAX = 'T') AND (t1.FAX IS NULL OR t1.FAX = ''OR t1.FAX = ' ')" objRS4.Open sql_DeliveryStatus,objSLXDB4.Connection If objRS4.EOF Then Exit Sub End If objRS4.MoveFirst Do Until objRS4.EOF With objRS4 objRS4.Fields("Delivery_Status").Value = "Pending" objRS4.Update End With objRS4.MoveNext Loop objRS4.Close Set objSLXDB4 = Nothing Else msgbox("OK") End If
|