Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box
Message
De
30/11/2000 20:46:29
 
 
À
30/11/2000 20:14:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00447810
Message ID:
00447822
Vues:
8
This is an example from one of my list boxes
This is in the InterActiveChange of the Parent listbox
WITH This.Parent
  lnCustId = INT(VAL(This.List(This.ListIndex, 2)))
  SELECT ;
    ALLTRIM(Contacts.LName) + ', ' + ALLTRIM(Contacts.FName) AS ContName,;
    Contacts.ContId;
    FROM ShopTrack!Contacts;
    WHERE Contacts.CustId = lnCustId;
    ORDER BY ContName;
    INTO ARRAY .cboContact.laData
  IF _TALLY = 0
    DIMENSION .cboContact.laData[1,1]
    STORE "No Contacts" TO .cboContact.laData
  ENDIF
  .cboContact.Requery()
  .cboContact.DISPLAYVALUE = .cboContact.LIST(1)
ENDWITH
>I have a small table of insurance companies and a child table of all the plans offered by the insurance companies. I have 2 combo boxes on a form one of the insurance companies, one of the plans. I want the user to select the insurance company in the first combo box and then have the second combo box limited to that company's plans.
>
>The first combo box on click throws its value (the number of the insurance company) to a memory variable. The second combo box is based on a local view of the plans table which filters by the variable that the first box stores its value to.
>
>My problem is that I cant make the second box requery. I initialiaze the variable to 1 and the second box shows company 1's choices when the form comes up But__ when you select a second value in the insurance company dropdown the plan box doesnt filter to its choices.
>
>Ive tried thisform.secondbox.requery in the click event of the first box, and ive tried this.requery in the got focus and click events of the second box. Im sure this is somthing simple but its driving me nuts.
>
>Any ideas?
>TIA
>Chris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform