Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cant get a ComboBox to select correct records
Message
De
27/04/2002 09:35:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00649961
Message ID:
00649970
Vues:
18
>Hi,
>
>I have a screen with a few fields as follows:
>
>Stock Group: MyStkGrp
>Stock Lookup: CboStock
>
>The CboStock box has Row Source = 3 (Sql Select) and coded as follows:
>
>Select * from StockFil where StkGrp = This.Parent.MyStkGrp.Value
>
>... nothing is selected
>
>
>I've used Combo Boxes before and had no problem. The only differencr I can see on this form is that the selection is based on another field on the form. Its as if Foxpro is not recognising the value inthe MyStkGrp field for the combo select.
>
>Is there something I'm doing wrong
>
>Thanks for your help
>
>regards,
>
>Gerard]

Gerard,
Style of using a field value on form also works.
-Be sure you assign rowsource in a method (you should be since it didn't error) probably in combo's init.
-Probably it's a char field. Use trim :
... where StkGrp = trim(This.Parent.MyStkGrp.Value) ...
-Also be sure you have a destination in rowsource. ie :
..into cursor crsStokGrp
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform