Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox / setting a default .value
Message
De
19/09/2002 14:43:05
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
 
 
À
19/09/2002 12:14:26
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00702313
Message ID:
00702390
Vues:
18
Try setting DisplayValue property of the Combo with your desired value. I beleive it must exist in the drop-down selection set, though...

HTH

>I am trying to set a combobox.value to a value which is looked up and returned from another table. I would like it to be displayed on the screen automatically, instead of it being empty.
>
>For example, in the Sales Order file I have a field named "cBillToID".
>Upon loading any sale order (previously entered), I would like to lookup that "cBillToid" field in the "CUSTOMER_BILLTO" table and return and display the returned "cCode" in the combobox (value) named "cboBillToCode" on the saleorder form.
>
>My problem is that upon loading any sales order my combo box (default value) is empty.
>
>I attempt the same thing to return the "cName" into a text field on the Sales Order form it works great. Is there a diffence with "text" fields and "combo" boxes in storing a value?
>
>I am not talking about the actuall drop down list. That is fine. That is a SELECT from the CUSTOMER_BILLTO table. That works ok.
>
>Following is my code from within the Sales Order form.
>============================================================================
>LOCAL llSkipSeek
>WITH THISFORM.pgfData.pgEntry
>
>llSkipSeek =THIS.oCurrentData.EOF() OR ( THIS.oCurrentData.TableIsEmpty() ) OR THIS.oCurrentData._lAddMode
>
>IF NOT llSkipSeek
> =SEEK(THIS.oCurrentdata.FieldGetValue("cBillToID"), "CUSTOMER_BILLTO")
>ENDIF
>
>.txtcBillToName.Value= IIF(NOT llSkipSeek, CUSTOMER_BILLTO.cName, SPACE(LEN(CUSTOMER_BILLTO.cName)))
>.cboBillToCode.Value= IIF(NOT llSkipSeek, CUSTOMER_BILLTO.cCode, SPACE(LEN(CUSTOMER_BILLTO.cCode)))
>
>ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform