Ho to make one field required based on critera of another field?

S

StarT

I'm creating a form and need to make the "comments" field required if the
"code" field is =>20. I appreciate suggestions! Deadline Monster is lurking!

User enters the job processing endcode value (numeric) into the "code"
field. If the endcode is =>20, comments are required.

(P.S. I don't know VB)

Thanks!
Star
 
R

ruralguy via AccessMonster.com

You would put your validation code in the Form's BeforeUpdate event.

If Me.EndCode >19 Then
If Len(Me.Comments & "") = 0 Then
MsgBox "Comments are required"
Cancel = True
End If
End If

...using *your* control names of course. Post back if you need additional
assistance.
 
Top