View Full Version : alter a field value on a report


doherp
10-10-2002, 03:45 AM
I need to create a report which swaps a set of values for those in a field. for example, if the field has values a,b,c,d I want it to show:
e if the field value is a,
f if the field value is b,

I have tried to activate a macro when the report opens which does this, but I get an error saying I cant alter this value in the report.
Is there a way around this, for example doing the swap in the query the report is based on?

thanks

Rich
10-10-2002, 05:59 AM
Delete the original text box on your report, add an unbound text box, set its control source to =Iif([MyField]="a","e",[MyField]) you'll have to extend it using a multiple if, or use vba to fill the text box

doherp
10-10-2002, 07:37 AM
cheers, I'll try that. I had found a longer way round by creating a temporary table, updating this to the new values and using this to print the reports. Your way looks cleaner though.