lcMySelectStatement = [.....,] + ;
IIF(< some logical statement >, "ThisField ", "ThatField " ) + ;
[AS MyField, ] + ;
[ .... ]
&lcMySelectStatement
and then just refer to MyField on the report.
>I have a report where I have set up a field that holds printall.&lcorder. Lcorder is a varible that is passed from a calling form. When I run the report, it gives me a syntax error on that field. Is it possible to macrosubstitute from a report? Lcorder holds a field name that is based on if that fieldname exists in the current table. If it does then lcorder holds that fieldname. If that fieldname is not in the table then it holds a field that is.
>
>Any help would be great
>
>Thanks