>Hi all,
> I have a group of fields, five in all that I need to go through sequentially. I have a for loop that that I thought would do this. They are named note1 through note5. I am trying to use something along the lines of:
>
>
FOR i = 1 to 5
> DO CASE
> CASE note(i)
> myCode
> ENDCASE
>ENDFOR
>
>What is wrong with this picture?
Nadya gave you a solution to the problem. But to answer your question about why is that a named expression (the "(i)") isn't valid here. I'm guessing that's what you want with the parens, and not that you're trying to access the notes fields as a collection.
Anyway, you need either EVAL as Nadya showed you, or a macro, as in:
FOR i = 1 to 5
lc = LTRIM( STR( i ) )
DO CASE
CASE note&lc
myCode
ENDCASE
ENDFOR
All this assumes these fields are booleans, right?