Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox Values Change
Message
From
23/02/2004 13:24:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/02/2004 13:20:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00879852
Message ID:
00880010
Views:
26
>>>I’m having an interesting problem that I can not seem to find the pattern. I have a form that has two combo boxes that are set as drop down lists. On the same form there is a radio button with 4 buttons.
>>>
>>>Both combo boxes have the same record source so that I can select two distinct values form the table. In this case a primary and secondary diagnosis.
>>>
>>>The radio buttons set the order of the items in the dropdown to either the description of the diagnosis or the numerical code of the diagnosis, and whether the list is the full list or a filtered list of the most used.
>>>
>>> Numeric all
>>> Numeric Most Used
>>> Alpha All
>>> Alpha Most Used.
>>>
>>>Now the problem. If is select a radio button, I get the order and filter set properly and can select the appropriate diagnosis. If after selecting the diagnosis, I click another radio button, the diagnosis code may or may not disappear. If I click that same radio button again, it may or may not reappear. I still can seem to find the pattern. It does seem to be related to having a value in the second of the combo boxes.
>>>
>>>I guess my questions is what are the considerations to having a value in a combo box and then changing the RowSsource and order?
>>
>>Alan,
>>I think your problems would end if you :
>>-Use a rowsourcetype = 3 &&SQL
>>-BoundTo = .t.
>>Cetin
>
>
>Cetin, Thanks for the suggestion. Due to the complexity of the select statement depending on which radio button is selected and whether there was a keyword search in effect, I tried putting the select on each of the radio button click events. I select into an array, but now I am having a different problem. The row source is now set to the array that I have build, and the rowsoucetype is set to 5=array. But when the dropdown happens there is only one row, and it shows as blank. When I click to select that blank row, the values in the first row of the array is returned. I have the array set as public, and when I close the form, the array has the values that I expect.
>
>I'm thinking it has something to do with changing the array after after it has been defined as the rowsource. Is there some statement that I must use to have the rowsource refreshed?
>
>This seems so simple and straight forware, but.......
>
>Alan

combo.numberofelements = alen(aName)

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform