Hi Gerard,
I hope, I understand you correctly, and you wanted the label's tag holds field actual value. The code, I just wrote, should be in form.Refresh also for all labels, otherwise label tag would hold only the first dysplayed record fields values. You may try to put the same code into Label.Refresh, but I'm not sure, it helps.
>
>Suppose the label caption is always the same as the field name for this particular label class (I'm assuming, you have your class for this kind of labels, have you?). In this case, you can try:
>In label Init
>
>local lcFieldName
>lcFieldName=alltrim(this.caption)
>lcFieldName='myTable.'+lcFieldName
>this.tag=transform(evaluate(lcFieldName))
>
>HTH
>
>
>>I find myself in form design needing to do following quite a lot:
>>
>>1. I have set up a no. of fields on the form
>>2. Now, I want to automatically set thr 'Tag' property of
>> every 'label' field to the associated field's name
>>
>>e.g. My label fields are : Fld1,Fld2,Fld3,Fld4
>>
>>I then want the tag property of each of these fields to be:
>> fld1,fld2,fld3,fld4 etc.
>>
>>Every time I set up a form, I have to go into each field manually and change the tag. I reckon there must be a better way...maybe using a builder but I have never used these .
>>
>>Thanks,
>>
>>Gerard
If it's not broken, fix it until it is.
My Blog