Format Dependent Combo Boxes

M

Michelle

I have a series of combo boxes on a subform which are populated based on values chosen from either the main form or the previous combo boxes on the subform. Some of these boxes will have no values to select from. If there are no values in the combo box (based on the previous selections), I would like the combo box disabled so the user does not have to pull down the arrow and find there is nothing to select. I am thinking this would be done after the requery of each selection

How should I do this

Thank you
 
S

Sam D

Examine the combo's ListCount property after populating the combo. Something
like....

cboName.enabled=cboName.ListCount<>0

HTH
Sam

Michelle said:
I have a series of combo boxes on a subform which are populated based on
values chosen from either the main form or the previous combo boxes on the
subform. Some of these boxes will have no values to select from. If there
are no values in the combo box (based on the previous selections), I would
like the combo box disabled so the user does not have to pull down the arrow
and find there is nothing to select. I am thinking this would be done after
the requery of each selection.
 

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