Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a blank option to a combobox
Message
From
14/10/1998 11:08:01
 
 
To
14/10/1998 11:03:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00146606
Message ID:
00146664
Views:
23
It's going good. I've integrated mapping into it. It plots the trips on a map, now. :) Doesn't route them, yet, though.

That's a cool idea, and if I had more sophisticated users, that would work. Unfortunately, my users are more likely to accidentally right click, then call me up because the stuff is disappearing.

Thanks,

-Michelle


>Hi Michelle ----
>
>(How's the trips project going?)
>
>As to blanks in Comboboxes I have a really simple solution (at the class level):
>
>PROCEDURE RightClick
>THIS.Value=""
>THIS.Refresh()
>
>All Comboboxes will blank on right click. You will want to change this if it's a numeric combo, of course.
>
>
>
>>
>>Frequently, my combo boxes are a list of codes that I use to set a filter. The codes are stored in a table along with their description. So for the recordsource, I use SQL:
>>
>>SELECT code, desc FROM codetable INTO CURSOR tmp ORDER BY code
>>
>>This works great if I want to force them to choose a code. But in some cases, I want them to be able to set the filter to everything. So, I want to put in the option to choose "". I don't, however, want to have "" as a code, since the codes are user-editable and they're likely to delete it. (Yeah, I know, I could get around that, but it makes things much more complicated)
>>
>>Is there an easy way to add the blank choice? I tried setting the SQL, then in the init doing THIS.AddItem(""), but I get an error. I think it was data type mismatch, but this was last night, so I don't remember for sure.
>>
>>I also tried, in the init, putting the SQL there, then doing AddItem to each record in tmp, and setting the rowsource to 0. I get the same error.
>>
>>Any ideas?
>>
>>-Michelle
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform