IIF statement in a report

Angel-888

Registered User.
Local time
Today, 09:58
Joined
May 13, 2013
Messages
12
Hi

I am quite new to access 2007 but trying to create an IIF statement in a report but don't know where to start.

My report has lots of 'Label' fields with standard text based on a query for the fields components. I want one of my labels to only appear on the report for print IF a record field called 'Program' (which is from a list) has the word 'RHICHOP' at the beginning of it. If RHICHOP is not in the beginning of the Program then leave out the label text.

Can anyone help??

Thanks
 
Try doing it this way

=IFF([Program]='RHICHOP',"RHICHOP",0). Then you do conditional formatting and make the field equal to '0' not visible. This should work fine. This is just a simple way and quick turnaround but think others might have other strong input ;)
 
Great thanks for the reply, but as mentioned I'm quite new.

Where do I put the statement in the report or query and how do I set the conditional formating?

Sorry to be a pain but I have not done this complexity before, it will save me creating another report and query for just one label field.

Thanks.
 
If you want to create a report just to display 'RHICHOP', create a query and add the field for program. Under criteria, type "RHICHOP", it will call out information only when program is 'RHICHOP'.

If you want to add this to your report, under the title Program, in the information box, just type =IFF([Program]='RHICHOP',"RHICHOP",0). On the Home tab, you will see conditional formatting...Just add the rules...

It is best to create a query and type "RHICHOP" under criteria for Program as it calls out only RHICHOP. Go by this - it is more simple and more effective.
 
Thanks for your help. The report changed and no longer needed the IIF statement. I have kept a copy of your info for future use will let you know how I go then.

Thanks again!
 

Users who are viewing this thread

Back
Top Bottom