Validating fields in a form

  • Thread starter Thread starter Donna S
  • Start date Start date
D

Donna S

Here is my problem, I have two fields in a form labeled A
and B. I need B to be checked if data was entered in A.
How can I do this? I've written vb code to validate the
fields before the user is allowed to get out of the form,
it runs the validation , displays the error message but
closes the form anyway without the required information.
Help!!!!
 
Hi,

In the OnUpdate section of the form, do the validation of
your fields. If the validation fails, warn the user. If
the user persists to continue closing without completing
the required fields, set Cancel to True. This wil ensure
that no incomplete records are added. This
procedure "SHOULD" always run whenever the user move the
recordset or unloads the form.

Regards,
Eric
 
Back
Top