update date field base on a dropdown

J

Jessica

I need the date field to require a date if yes is selected from a dropdown. I
have the below fields

IE (yes or no drowpdown)
Date of Last IEP (date field)
 
D

Daryl S

Jessica -

Assuming this is a form with the two fields mentioned, I would suggest
putting your validation code on the BeforeUpdate event, and if the IE is No,
and there is no date, then you can Cancel the event and show an error
message.

Your code in the BeforeUpdate event would be something like this:

If Me.IE = "Yes" Then ' Assuming text if you are using a drop-down instead
of a checkbox
If isnull(Me.LastIEPDate) Then
Cancel = True
msgbox ("If IE is Yes, then you must enter a date")
End If
End If

Hope that is what you are asking for.
 

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