Required field based on checkbox of another

M

MB

I have a field called "Video done?" with a checkbox (checked = yes; not
checked = no). The other field is "Date of Video." Obviously this date is
not required if the box is not checked for "Video done?" How do I make "Date
of Video" required if the "Video done?" box is indeed checked?

Thank you.
 
F

fredg

I have a field called "Video done?" with a checkbox (checked = yes; not
checked = no). The other field is "Date of Video." Obviously this date is
not required if the box is not checked for "Video done?" How do I make "Date
of Video" required if the "Video done?" box is indeed checked?

Thank you.

Regarding... Obviously this date is not required if the box is not
checked for "Video done?"
I don't understand why you need the check box at all.
If the date is not entered then "obviously" the [Video Done] is not
"done". It seems to be a superfluous field.

That being said, you could code the Forms BeforeUpdate event:

If [Video Done] = -1 and IsNull([Date of Video]) Then
MsgBox "Please enter the date the video was done."
Cancel = True
Me.[Date of Video].SetFocus
End If

You will not be able to save the form data unless a date has been
entered.
 

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