IMHO, not adding the disabled ones in the first place is a better approach.
You didn't tell us how you are populating the combobox. SQL rowsourcetype might be a good choice.
>Hello,
>
>I have a ComboBox that I am populating with a mix of enabled and disabled items (need to keep the disabled items so old data can display properly). When adding a new record, I want to make sure disabled items cannot be selected.
>
>Appending "\]" to the front of the combo's Value grays out the items just like I want, and such items can not be clicked on with the mouse nor selected by arrowing through the items via keyboard (they are skipped). So far, so good.
>
>The problem is that this ComboBox is actually a subclass where I have added "SmartSearch" capability. When the user types character, the value auto selects to match what they have typed so far (like smart searches in more modern controls). I do the search by a straight check of list item DisplayValues, and cannot tell if the item is disabled. The "\]" that told FoxPro to disable the list item is long gone, and I cannot see any other property or method that can tell me a certain list item is part of a disabled row.
>
>Is there some way to know I am about to select an item that is disabled so I can make sure it is disallowed? Hope I am being clear about what I am running into, and much advanced gratitude to anyone who can help!
>
>Thanks,
>Joe Kaufman