Maybe I am not understanding this correctly. I thought if I did a Cancel = True in my code in the BeforeUpdate event, that the previous value that was in the text box (txtPropertyNewName) would be put back. In my code below, I stepped through it and the Cancel = True does run, but when I go back to the form, the text has not be replaced back into the field (txtPropertyNewName).
Can someone see what I am doing wrong?
Can someone see what I am doing wrong?
Code:
Private Sub txtPropertyNewName_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_txtPropertyNewName_BeforeUpdate
If IsNull(Me.txtPropertyNewName) Then
If IsNull(Me.cboPropertyID) Then
MsgBox ("Enter in a new Property before clearing out the Property New Name")
Cancel = True
End If
End If
Exit_txtPropertyNewName_BeforeUpdate:
Exit Sub
Err_txtPropertyNewName_BeforeUpdate:
MsgBox (Err.Description & ":txtPropertyNewName_BeforeUpdate")
Resume Exit_txtPropertyNewName_BeforeUpdate
End Sub