Before Update

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
 
R

Ronald Dodge

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.
 
G

Graham Naylor

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top