Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
From 1 combobox to another
Message
From
18/07/2000 12:14:12
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00391237
Message ID:
00393881
Views:
32
Hi Timothy.

>> Sounds like alot of code there. I was fooling around and accomplished by putting this into the gotfocus event of the combobox1:
[thisform.myCombobox1.RowSourceType = 3
thisform.myCombobox1.RowSource = "SELECT name,noun from bsyear00 WHERE subs(bsyear00.noun,2,3) $ thisform.mytextbox2.value INTO cursor cur1"]
and it worked. <<

< lol > It really is not that much code ;-). All the code in the Init of the form does is programatically set up the RowSources for the Combo and the list boxes. The reason for this is that you cannot use 'Thisform' in the property sheet to set them up. The code is in the init of the form because that is the only place where you can be sure that both controls are already instantiated. If you put the code to set their respective RowSources in the individual controls' inits, you could not be sure that the dependent control would instantiate after the control that it depends upon.

All that remains to to issue a requery of the dependent control in the GotFocus of the controling one.

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform