Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox with no entries
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Combobox with no entries
Miscellaneous
Thread ID:
00494738
Message ID:
00494738
Views:
55
I have a combobox class which uses an array ROWSOURCE. The way my code currently works, the array is populated via a SQL SELECT statement. If no records are retrieved by the SQL, the array has 1 row, with all elements being .F. Conceptually, this is a zero-row array, and therefore a zero-option combobox.

Is there any way to make the combobox NOT drop down in this situation? I tried putting the following code in the DROPDOWN() event:
IF VARTYPE(MyArray[1]) = "F"
   NODEFAULT
ENDIF
but to no avail.

If I can't suppress the drop down, I can instead populate that one row with dummy values -- but then I have to make all of my code handle the possibility that the user has selected the "dummy" row.

Am I missing the obvious solution here?
Next
Reply
Map
View

Click here to load this message in the networking platform