>VFP 6.0
>SP 5
>Windows 98
>
>Anyone can help me?
>
>How can I calculate a column in Grid poblated by free fields.
>My coding is like this:
>
>If x
> LnMyVariable = 1
>Else
> LnMyVariable = 2
>Endif
>
>select DETAILS
>Thisform.GridLiquidac.RecordSource = 'DETAILS’
>Thisform.GridLiquidac.Liquid.ControlSource='DETAILS.Field1'
>Thisform.GridLiquidac.Item.ControlSource ='DETAILS.Field2' Thisform.GridLiquidac.Weight.ControlSource='DETAILS.Field3'
>Thisform.GridLiquidac.Libras.ControlSource='DETAILS.Field3' * LnMyVariable'
>Thisform.GridLiquidac.refresh()
>
>* But can´t obtaind the desired results, and receive the error message: Data type Mismatch (or error number 1742) when I define like this:
>
>'DETAILS.Field3' * LnMyVariable
>
>And see nothing when I define the line as follow:
>Thisform.GridLiquidac.Libras.TxtLibras.value ='DETAILS.Field3' * LnMyVariable'
>
>Property Status in Grid:
>Bound = .f.
>Sparse = .f.
>
>What is wrong here?..What am I doing bad.?.
>Any better idea?
>
>Thanks
>Carlos Burgos
Carlos,
Double post :)
Thisform.GridLiquidac.Libras.TxtLibras.ControlSource = ;
'(DETAILS.Field3 * ' + iif(x,'1','2')+')'
Cetin