Hi Nick,
local i, younumber, lRetValue
for i=1 to yournumber
lRetValue=evaluate('test.'+'spam'+transform(i)
next
BTW, make sure to use < pre > and < /pre > tags to outline your code correctly.
Hope this helps.
Michelle, cc to you, because evaluate is better, than macro expansion.
>I have 4 fields (actually 15 but I'm keeping it down to 4 for this example). They are name the following:
>
>
>test.spam1
>test.spam2
>test.spam3
>test.spam4
>
>in my for loop I want to cycle through these fields and based on which loop number I arrive at, I need to get information from the correct field.
>
>for a = 1 to 4
> z = test.spam?
>endif
>
>my problem is how do attach the right field number to the end of test.spam? so that I can retrieve correct infomation from field. For example if a = 2 then I want to give 'z' the value of test.spam2. if a = 4 then 'z' should equal the value of test.spam4. Help appreciated.
>
>thank you
>nick patel
If it's not broken, fix it until it is.
My Blog