Before Update

  • Thread starter Thread starter Graham Naylor
  • Start date Start date
G

Graham Naylor

Hi,

I've got a form (Access 2000) where I want to validate a couple of fields
before moving to the next record, this move will be performed using the
standard controls on the bottom of the page.

Do I put the code in the "before update routine" relating to the form, and
how do I stop the move happening umtil the field's content is valid?

Thanks
Graham
 
Yes, you use the Form's BeforeUpdate Event (record level updating), and if
it's not valid, set the Cancel variable to True. You may also want to
include either a Msgbox or have a message put in a label/status bar for when
the validation check does fail.
 
Thanks for the help, works perfectly.

Ronald Dodge said:
Yes, you use the Form's BeforeUpdate Event (record level updating), and if
it's not valid, set the Cancel variable to True. You may also want to
include either a Msgbox or have a message put in a label/status bar for when
the validation check does fail.
 
Back
Top