Print Text depending on boolean value (1 Viewer)

rmsimps

New member
Local time
Today, 15:41
Joined
Apr 7, 2019
Messages
6
I have a report that if the value of a boolean is false it will print "Dropped", and if true will print "Attending". I had it working at one time, but will not work now.

In the caption of the label I put the following code: =IIF([Attending] = True, "Attending", "Dropped") where [Attending] is the control.
 

isladogs

MVP / VIP
Local time
Today, 22:41
Joined
Jan 14, 2017
Messages
18,186
When you say it doesn't work it would help to say what does happen

Anyway, you need to use the field name in your expression - not the control name
 

Micron

AWF VIP
Local time
Today, 18:41
Joined
Oct 20, 2018
Messages
3,476
You can put an expression directly into the label caption property and it will evaluate??
 

rmsimps

New member
Local time
Today, 15:41
Joined
Apr 7, 2019
Messages
6
I solved my own problem with help from isladogs and Micron. Thank you. :) You jogged something in my brain.

I was placing my code into the wrong spot. I created a unbound text box and put the text in the control source. It works great.
 

Users who are viewing this thread

Top Bottom