Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate field in Grid with free table
Message
De
01/09/2003 22:33:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
01/09/2003 18:44:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00825137
Message ID:
00825158
Vues:
18
>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=.t.

This can be simplified as:

if x

... since x is already of a logical type.
if x
   LnMyVariable =  1
Else
   LnMyVariable =  2
Endif
Spaces in VFP code are preserved if you use the HTML codes < PRE > (at the beginning), and < /PRE > (at the end). (Without spaces.)

>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 when I define like this:
>
>'DETAILS.Field3' * LnMyVariable

I think you should put quotations marks around the entire expression:
Thisform.GridLiquidac.Libras.ControlSource="DETAILS.Field3 * LnMyVariable"
or perhaps:
Thisform.GridLiquidac.Libras.ControlSource="=DETAILS.Field3 * LnMyVariable"
Try both, and see which works.

Saludos,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform