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:
00144885
Vues:
29
cboCity Customer.City_ID SELECT City,City_ID from Cities

Jim,

In the cboCity combobox set the rowsourcetype to SQL but leave the rosource empty. In the Requery method of cboCity put code like this;
* cboCity equery
IF TYPE("THISFORM.cboState.Name") = "C"
   * The state cbo exists
   IF NOT EMPTY(THISFORM.cboState.Value)
      THIS.RowSource = "SELECT City,City_ID from Cities " + ;
                        "WHERE State = THISFORM.cboState.Value INTO CURSOR Temp"
   ELSE
      THIS.RowSource = "SELECT City,City_ID from Cities INTO CURSOR Temp"
   ENDIF
ELSE
   THIS.RowSource = "SELECT City,City_ID from Cities INTO CURSOR Temp"
ENDIF
Then from the when or interactivechange of the cboState simply;

THISFORM.cboCity.Requery()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform