>I have two questions about Comboboxes, one of which I asked a few weeks ago, and still haven't been able to solve. These questions involve a parent Combobox class that I created, which is used all over; so, I can't tailor it to an individual situation.
>
>1) I want the Comboboxes to Enable/disable based on the number of items in the ListCount: 0 or 1 - disable; 2 or more - Enable. Where can I put code that will fire when the number of items in the Combobox (or in the RowSource) changes? (ListCount_Access didn't fire and ListCount_Assign is illegal. I've tried a bunch of other things, too.)
>
Did you try to put your code in the when()
for example,
if this.listcount()=0
return .F.
endif
>2) I sometimes want the DisplayValue to be different than the Value. For example, if the RecordSource's data contains a pipe ("|"), I want to remove it in the DisplayValue, but not in the source data. I tried putting
>This.DisplayValue = STRTRAN(This.Value, "|")
>into various methods or putting =STRTRAN(This.Value, "|") into the DisplayValue property, but nothing changed the values in the pulldown list. Any ideas?
>
>Jerry
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only