>Hi. I am trying to use macro substitution to select a field from the active record of a dbf and put it in a variable to use as a report heading.
>
> Why won't this line of code work:
>codename=codelist.code(xcode).value
>
Couple of things:
Codelist and code are not objects. There is no need to append the value property to get the value.
The syntax you are trying (as you have found) is not allowed. I think the proper way to do this would go something like:
cFieldName = "CodeList.Code" + xCode
uValue = EVAL(cFieldName)
Erik Moore
Clientelligence