Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox make sure user made selection
Message
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01651150
Message ID:
01651153
Views:
68
>Hi,
>
>One of the forms has a combobox where a user makes a selection then clicks on a command button. In the click code of the command button I check that a user made a selection in the combobox using this code:
>
>
>	IF this.Parent.site_lookup.ListIndex = 0
>		=MESSAGEBOX("Please select Program",48,"Missing Selection")
>		RETURN 
>	ENDIF 
>
>
>But a couple of times (which I can't duplicate) the combobox's DisplayValue (or the Value you see) was blank but the above code didn't fire. It tells me that there could be a case where the .ListIndex is greater than 0 but no item is selected in the combo.
>How else, beside the code above, I can check that the user did indeed make a selection?
>
>Update: In other words, can I use the property DisplayValue to check if user made the selection (in addition to the ListIndex)?

I think I normally check value or displayvalue.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform