Access MS Access IIF Help

Joined
Dec 17, 2006
Messages
1
Reaction score
0
I'm very new to access so please be patient. In my table, I have one field ("Cont_bed_a") thats either going to be a 0,1,2 or 3. In my report, I only want to see it if its a 2, otherwise, I don't want it to show anything. Would I use an IIF statement in the control sorce of my report for that field?

IIf([Cont_bed_a]=2,[Cont_bed_a]) This doesn't work of course..
 
IIf([Cont_bed_a]=2,[Cont_bed_a]) This doesn't work of course..

try

IIf([Cont_bed_a]=2,[Cont_bed_a],"")

In an iif statement you have IIF(condition, if true, if false)

You have nothing for the if false so it puts everything in
 
Back
Top