Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox RecordSource Options
Message
 
À
07/10/1998 21:42:19
Jim Underwood
Apollo Information Systems, Inc.
Houston, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00144858
Message ID:
00144860
Vues:
27
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform