I'm going to assume that your using a Value List for your combo...
1. You could just set up a CaseSelect that would evaluate the combo
selection, and enable or disable accordingly. Check out Help on how to set
up a CaseSelect... it's pretty straight forward, and eassier to set up for a
newbie than a "nested" IIF statement.
2. The next solution would be to make the combo two columns. The first
column would be the value you want to select, the second would be a Yes or
No accordingly. Your value list would look like this...
Value1, Yes ; Value2, Yes ; Value3, No ... etc
On the AfterUpdate event of your combo...
IF cboYourComboName.Column(1) = "Yes" Then
Then YourDateField.Enabled = True
Else
YourMyDateField.Enabled = False
End if
**Use this same code behind the OnCurrent event of the form itself, so
that the enabling/disabling is always in synch with the combo selection.
----------------------------------------------------------------------
3. Since a change in the number of combo options might change in the
future, the best method is to store the Yes/No value with the combo values
in a seperate table, and use that little 2 column table as the RowSource for
your combo... rather than a ValueList.
Ex.
Value HasDate
ABC Yes
CDE Yes
FGH No etc... etc...
That way, if a sixth or seventh item is ever added, you just add that choice
to the table, with an approprite Yes or No, and nothing in your forms or
reports coding has to be re-edited to "evaluate" if that entry requires a
Date or not.