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

Jim Underwood
Apollo Information Systems, Inc.
Houston, TX
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform