Enabling or disabling a combo box based on multiple criteria.

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.
 
R

Rob Oldfield

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"
 

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