Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box
Message
From
26/10/1998 07:56:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Combo Box
Miscellaneous
Thread ID:
00150414
Message ID:
00150414
Views:
57
I have on a form an option group and a drop down combo box. The items shown in the drop down combo box are depending on the option chosen in the option group. The row source type of the combo box is 3-SQL Statement. In the interactive change event of the option group I change the SQL statement for the combo box row source accordingly.
The control source of the drop down combo box is bound to a field in the underlying table of that form.

Everything works fine. If an option is chosen the relevant items only are shown in the drop down combo box. If I click on an item of that list the correct item is saved in the field of the underlying table.

However, when I navigate through the records, only values are shown in the textbox part of the drop down combo box which correspond to the SQL statement of the last chosen option.
E.g. if the last option chosen was option 3 the values in the text box part of the combo box are only shown for records with have option 3 chosen. In records with option 1 or 2 and so on chosen the text box part of the drop down combo box is empty although the field in the underlying table bound to the drop down combo box has a correct value stored in it
It seems, that the SQL statement in the row source of the drop down combo box acts like a filter for what is shown in the text box part.
I wonder if that is inherent to combo boxes used in that context or whether I do something wrong.

I have found some workarounds (e.g put in to the lost focus event of the combo box a SQL statement that selects all options) but none of them are very satisfying.

I am new to VisualFoxPro (coming from Access) and would be grateful for any help or hints in that matter.

Thanks

Josef
Next
Reply
Map
View

Click here to load this message in the networking platform