Enabling or disabling a combo box based on multiple criteria.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form on which combo box cboCategory is followed by combo box
cboSubcategory. There are about 30 categories in cboCategory, and about half
of them have linked subcategories under cboSubcategory. I would like
cboSubcategory to be disabled if the user selects a category from cboCategory
that has no linked subcategories.

I created a sub-routine for another set of controls to disable the second
combo box if any but one particular record is selected in the combo box that
precedes it, but in this case, there are about 15 records with linked
subcategories records, and about 15 without, so I don't know how to do it
beyond a simple If - Then - Else Statement.

I've tried a couple different sub-routine options, including a big, long
series of If - Then - ElseIf statements, but no luck so far.
 
How are you setting the source of cboSubcategory? However you're doing it
there should be a way of modifying that code so that if does something like
"if there are now records that match this new criteria, then disable the
combo"
 
Back
Top