Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox loosing it's spot.
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Combobox loosing it's spot.
Miscellaneous
Thread ID:
00809009
Message ID:
00809009
Views:
70
I have a view that's being used as the RowSouce for a combobox. My problem is that the pointer location in the combobox doesn't match the record location in the view when I run this code.


SELECT &lcView1Alias
LOCATE FOR &lcView1Alias..Key_id = &lcView2Alias..Key_Id
This.cboBox1.Value = &lcView1Alias..Name
This.cboBox1.Refresh()
LOCATE FOR &lcView1Alias..Key_id = &lcView2Alias..Key_Id


The glitch is with the 3rd line of the code because &lcView1Alias.Name is not unique. If there are four 'names' that are the same, it always ends up on the first one once the 3rd line of code here is run, which is why the Locate is run again at the end. The problem is that now when a user clicks the downarrow on the combobox, it looks like they're sitting on the first 'name' instead of the one they selected. Anyone have any suggestions on how to fix this? (other than changing what cbobox1.value is? don't want to have to do that due to the amount of other code that would have to be changed).
-thanks!
ICQ 10556 (ya), 254117
Next
Reply
Map
View

Click here to load this message in the networking platform