Check Boxes in Form - Must Choose One

  • Thread starter Thread starter DBennett
  • Start date Start date
D

DBennett

Guest
If you respond to this posting, please be sure to respond in VERY simplistic terms. My brain can't take lingo (yet!).

I have a form.

This form has a combo box called category. The user picks one of the categories from the list. If the user picks "Service Agreement" from the list a set of check boxes appears for them to check which type of Service Agreement it is. They are able to choose more than one. However, my problem is that I want them to have to choose at LEAST one. There are about 12 of these subtypes.

Does this question make sense? Can anyone help. Remember, simple terminology please.

Thanks.
 
Try putting this code in Before Update event for the form, or in the Lost Focus event for the actual checkbox frame.

If IsNull([yourFrameName]) Then
Msgbox "Choose at least one option.", _
vbOkOnly,"Warning!"
Me.yourFrameName.SetFocus
End If

Or if you are storing that value in a table, just set that field's required property to Yes.
 
More detail for a more detailed answer please.

In my form. I have a combo box. The choices in the box are: Service Agreement, Industrial Rent, Professional Services, and Misc.

If the user chooses Service Agreement or Industrial Rent a bunch of check boxes become visible. These choices are: Security, Landscape, Parking, and Custodial. The user may choose any of them or all of them. I need to know how to make him choose one of them at least.

The problem with the answer that I already received is that If the combo box choice is Professional Services or Misc. these check boxes still exist, they are just not visible. The user does not have to make a choice in this instance. Only if the boxes are visible.
 

Users who are viewing this thread

Back
Top Bottom