View Full Version : Changing the reported field value based on a condition


novoiceleft
02-26-2005, 02:04 PM
In my report, I want the value of the text field called "Client" to be overwritten with the word "Confidential" - if the Tick Box called "Client Confidential?" is ticked.

How do I do that ? In the report, or in the underlying query ? And how ?

NoVoice

RichO
02-26-2005, 02:25 PM
In the textbox itself:

=IIf(ConfidentialCheckBox = True, "Confidential", "Client")

novoiceleft
02-27-2005, 01:49 AM
In the ControlSource property of the Client field I used the following.

=IIf([Client Name Confidential]=True,"Confidential",[Client])

It works OK in the True condition (ie the report said "Confidential"), but otherwise I got #Error. Is that because its a circular refererence ?

Before I put the IIf in there, the ControlSource said Client and it worked fine...

Eh ?

NoVoice

Rich
02-27-2005, 05:49 AM
delete the original control and add the calculation you have to a new one

novoiceleft
02-27-2005, 02:04 PM
It worked ! Fantastico

NoVoice