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

  • Thread starter Thread starter StarT
  • Start date Start date
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
 
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.
 

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

Back
Top