Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution
Message
From
16/12/1999 23:37:04
 
 
To
16/12/1999 23:21:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00305094
Message ID:
00305100
Views:
18
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform