Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Easy Question
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00095727
Message ID:
00096649
Views:
17
>Can Someone please offer some insight??
>
>In my search for the ever changing correct way to do things..
>
>The Over-Simplified Vesrion:
>
>If I have a combo-box (Referred to as comStates) that contains the Names of States of the USA and this Combo-Box's Control Source is thisform.cState_Name
>
>My Second Combo Box would Contain the users of that state based upon
>the Value of the first combobox. I would do a SQL Statement in the Rowsource of the 2nd comboBox that said something like...
>
>Select * from States where st_Name=thisform.comStates.Value into Cursor comNames
>
>Of course, this will Puke... I was wondering how a more 'Seasoned' approach to this would be??
>
>Thanx Much!!!
>Bob :-)
I'd never claim to have elegant code but this is what I do.
In the init for the combo box I have
this.rowsource = "Select * from States where st_Name=thisform.comStates.Value into Cursor comNames"

then in the lostfocus for thisform.comStates I'd have a thisform.1stcombo.requery()

Sarah
Sarah King
pcpropertymanager.com
Previous
Reply
Map
View

Click here to load this message in the networking platform