>I have a grid based on table1 with 2 columns. Column controlsource is table1.cd_type Column2 the controlsource is table2.ds_type2 when table1.cd_type = 1 or is table3.ds_type3 when table1.cd_type = 2
>
>table1
>cd_type N(5)
>
>table2
>cd_type N(5)
>ds_type2 C(35)
>
>table3
>cd_type N(5)
>ds_type3 C(35)
>
>Thank to you all
If you're asking how to implement 'flexible' appearance of the second column, then you can use customized column controlsource:
This.MyGrid.Column2.Controlsource="Thisform.GetColumn2(Table1.cd_type)"
LPARAMETER nType
IF nType=1
Return table2.ds_type
ELSE
Return table3.ds_type
ENDIF
PS: If your algorithm is really so simple then you can use simple IIF(..) as column.controlsource.
Edward Pikman
Independent Consultant