Hello All,
My validation code in the before_update event is not activated on click of the save button on my form.
Please help. My code is below.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.cboReissueReason.Value = "" Then
MsgBox "This is mandatory. Please Select a Reissue Reason", vbOKOnly
Cancel = True
Me.cboReissueReason.SetFocus
Exit Sub
End If
If Me.cboEstatepfx = "" Or IsNumeric(Me.cboEstatepfx) Then
MsgBox "Please correct Invalid Data at EstateNamePrefix field.", vbOKOnly
Cancel = True
Me.cboEstatepfx.SetFocus
Exit Sub
End If
If Me.txtEstateBordereauNo = "" Or Not IsNumeric(Me.txtEstateBordereauNo) Then
MsgBox "Please correct Invalid Data at EstateBordereauNo field.", vbOKOnly
Cancel = True
Me.txtEstateBordereauNo.SetFocus
Exit Sub
End If
End Sub
My validation code in the before_update event is not activated on click of the save button on my form.
Please help. My code is below.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.cboReissueReason.Value = "" Then
MsgBox "This is mandatory. Please Select a Reissue Reason", vbOKOnly
Cancel = True
Me.cboReissueReason.SetFocus
Exit Sub
End If
If Me.cboEstatepfx = "" Or IsNumeric(Me.cboEstatepfx) Then
MsgBox "Please correct Invalid Data at EstateNamePrefix field.", vbOKOnly
Cancel = True
Me.cboEstatepfx.SetFocus
Exit Sub
End If
If Me.txtEstateBordereauNo = "" Or Not IsNumeric(Me.txtEstateBordereauNo) Then
MsgBox "Please correct Invalid Data at EstateBordereauNo field.", vbOKOnly
Cancel = True
Me.txtEstateBordereauNo.SetFocus
Exit Sub
End If
End Sub