Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Erasing a combobox's memory
Message
 
 
To
13/07/2005 15:43:16
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01032369
Message ID:
01032399
Views:
20
Elyse,

You need to call the Requery() method of the second cbo so that it'll reconstruct the droplist.

>I have a combobox (RowSourceType=3-SQL Statement, Style=2-Dropdown List) whose RowSource changes based on the value of another field. For example, if the other field's value is "A", the values for the dropdown are "A","B", and "C". If the other field's value is "B", the values for the dropdown are "1","2", and "3". When the value of the other field changes, I reassign the RowSource of the combo to a new SQL Statement. But the combobox "remembers" the previous position, i.e. if the value was "2" and I change the RowSource, the value will appear as "B", the second item in the list. I've tried setting the Value and DisplayValue to "" and the ListIndex to 1 (the first element is always "") after resetting the RowSource, but when I click on the combo it still remembers its previous position. Any ideas?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform