>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