Hi - is it possible to set a form to require a selection from a combo if a
check box is set to true?
I've tried using the validation rule set to the check box name, but it
doesn't work...
Are you using a Form (good) or a table (much less good)? You can do the
check
in a Form's BeforeUpdate event:
Private Sub Form_BeforeUpdate(Cancel as Integer)
If Me!checkboxname = True Then
If IsNull(Me!comboboxname) Then
Msgbox "If the checkbox is checked you must select an item", vbOKOnly
Cancel = True
Me!comboboxname.SetFocus
End If
End If
End Sub
If you're using a table... well, don't; but if you are, you'll need to use
the
Table Validation rule, not field validation (which cannot refer to other
fields). E.g.
([checkboxname] = True AND [combobox] IS NOT NULL) OR ([checkboxname] =
False)