Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coordinating Combo boxes
Message
From
14/07/1999 13:47:13
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00241378
Message ID:
00241385
Views:
13
Maybe a THISFORM.Combo2.ListIndex = 1 after the Refresh() will do the trick.

HTH

>I am trying to use two combo boxes on a form - cbo1 lists AWS specification numbers and the cbo2 is to list the classes within that specification. I have two tables - one is spec numbers and titles and the other is spec numbers and classes.
>
>In the form load I have:
>
>Use q:\qa\qdms2000\support\aws_classes in 0 alias aws_classes
>set order to tag class
>go top
>use q:\qa\qdms2000\support\aws_specs in 0 alias aws_specs
>set order to tag spec
>go top
>
>Then, in the interactive change event of cbo1, I filter the classes table to only those that match the spec that is selected:
>
>thisform.lockscreen=.t.
>select aws_classes
>set filter to aws_classes.spec=aws_specs.spec
>set order to tag class
>go top in aws_classes
>thisform.combo2.requery()
>thisform.combo1.refresh()
>thisform.combo2.refresh()
>THISFORM.refresh()
>thisform.lockscreen=.f.
>
>Unfortunately, I am having no luck in getting cbo2 to start at the TOP of the filtered table after a change. It always winds up with the record pointer in the same relative position as it was for the previous cbo1 choice (i.e. the third class name ). If the record pointer is in a relative position that is larger than the number of records in the newly filtered table, then cbo2 is blank.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform