I have a numeric field that I want to clear if a research "flag" field is True. I put the following code in the BeforeUpdate event, but it is not halting the update. What have I left out?
-------------------
Rob Foye
Database Management
Regions Bank
Code:
Private Sub txtNewPayment_BeforeUpdate(Cancel As Integer)
If optResearch = True And ((Not IsNull(txtNewPayment) Or txtNewPayment = "")) Then
MsgBox "You can not add a payment for an account marked Research", , "Research"
Cancel = True
Me!txtNewPayment.Undo
Me.Undo
End If
End Sub
-------------------
Rob Foye
Database Management
Regions Bank