Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox RecordSource Options
Message
 
To
07/10/1998 21:42:19
Jim Underwood
Apollo Information Systems, Inc.
Houston, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00144858
Message ID:
00144860
Views:
24
Jim,
Put the code to change the City combo in the InteractiveChange event of the State combo. Don't forget a requery() on the City combo.

HTH
Barbara

>What is the best approach to provide for two different SQL SELECT criteria for a ComboBox RecordSource?
>
>For example, suppose you have a form with two ComboBoxes:
>

>Control Control Source RowSource
>cboState Customer.State_ID SELECT State,State_ID from States
>cboCity Customer.City_ID SELECT City,City_ID from Cities
><\pre>
>
>What I'd like to do is for the cboCity do display one of the following lists:
>
>(1) IF the cboState control source (Customer.State_ID) is 0 or empty, show ALL cities for ALL states
>
>(2) Otherwise show only the Cities whose Cities.State_ID = Customer.State_ID entered in the cboState control.
>
>I know how to write the SQL SELECT for both of these cases, but how do I change the RecordSource of the cboCity control during runtime?
>
>TIA,
>jmu
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform