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..
 
Joined
Dec 20, 2006
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top