Cancelling a record change

  • Thread starter Thread starter Tony Nichols
  • Start date Start date
T

Tony Nichols

Cna anyone tell me if there is a effecient way to cancel
a record change, like using the escape key? Do I use a
sendkeys command?

I want to do some field validation and not except the
change if the validation is not met in the beforeupdate
event.

I also do not want to accept changes in subforms to
related tables so I need to not allow changes in the
subforms as well.

Again thanks in advance for any assistance. Dirk & Paul
thanks for the tip on shuting down the mouse.

Tony Nichols
 
Me.Undo

The above code step will revert the current record back to what it was when
it was last saved.
 
The BeforeUpdate event has a 'Cancel' property, and all
you need to do is include a line in your code like:

IF ValidationExpression =False Then
Cancel = True
End IF

HTH,

TK
 
Back
Top