Is the beforeupdate event reliable? I have the following code in it for a drop down box and sometimes it does not put the order ID in when the user clicks Yes.
Private Sub Client_ID_BeforeUpdate(Cancel As Integer)
If Me.Client_ID.Column(6) = "Unpaid" Then
Msg = "This Client has an open order, would you like to post this payment to the open order?"
Style = vbYesNo + vbQuestion + vbDefaultButton2 ' Define buttons.
' ' Define title.
' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
Me.cboEntryType = "Payment"
Me.Order_ID = Me.Client_ID.Column(7)
Else
'Cancel = True
End If
End If
End Sub
Private Sub Client_ID_BeforeUpdate(Cancel As Integer)
If Me.Client_ID.Column(6) = "Unpaid" Then
Msg = "This Client has an open order, would you like to post this payment to the open order?"
Style = vbYesNo + vbQuestion + vbDefaultButton2 ' Define buttons.
' ' Define title.
' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
Me.cboEntryType = "Payment"
Me.Order_ID = Me.Client_ID.Column(7)
Else
'Cancel = True
End If
End If
End Sub