Emmanuelle
05-08-2001, 06:03 AM
Hello everybody
I wrote a validation test in my beforeUpdate Event which DOES NOT WORK!!!! The user is prompted to enter a number if he leaves a textbox empty and I want the beforeUpdate event to be cancelled and the user be able to make its changes. However before the user can do anything, there is a message error:
you can't save this record at this time. BUT I DON'T WANT TO SAVE IT!!!
here is my code
If Me.Dirty Then
If IsNull([Updatelevel]) Then
MsgBox "Please enter a number in the update level"
Me.Undo
Cancel = True
Exit Sub
End If
end if
what is wrong in my code?
thanks for your help
emmanuelle
I wrote a validation test in my beforeUpdate Event which DOES NOT WORK!!!! The user is prompted to enter a number if he leaves a textbox empty and I want the beforeUpdate event to be cancelled and the user be able to make its changes. However before the user can do anything, there is a message error:
you can't save this record at this time. BUT I DON'T WANT TO SAVE IT!!!
here is my code
If Me.Dirty Then
If IsNull([Updatelevel]) Then
MsgBox "Please enter a number in the update level"
Me.Undo
Cancel = True
Exit Sub
End If
end if
what is wrong in my code?
thanks for your help
emmanuelle