Easy report question?

Lucy R

New member
Local time
Today, 05:14
Joined
Mar 26, 2004
Messages
7
I am a relatively new access user (started 2 days ago!) and have been learning as I go with the aid of the Help key. I have become stuck on the question below:

I have the following expression in a text box in a Header in a report =IIf([Performance Manager?]="Yes","PM Product","NPR Product").

Performance Manager? is a Yes/No field in a Text box in a Table.

What I want to do is only have the 'Yes' products show in my report. i.e. I don't want any NPR products showing. What is the formula I should be using?

Any help would be greatly appreciated!!!!!

Cheers, Lucy
 
Hi There

I am probably the last person that should be offering suggestions, but there are two things that maybe you should look at…

1. I think that the data you are looking for should be coming from a query instead of just some criteria in a text box;
2. I believe there are restrictions of sorts of what can be done in the headers/footers of reports, forms etc.

I am willing to stand corrected by some of the “long in the tooth” people of the forum if I am off track.

This is a great place to get ideas and suggestions, so keep coming back!!!

Navyguy
 
Lucy,

NavyGuy is right, you should have your Iif as part of your
query. That way you can display it for every record in
your report.

Just make a new field in your query (please base your
report on a query):

Product: IIf([Performance Manager?], "PM Product", "NPR Product")

Since it's a true/false field, you don't use "yes", it is just
true or false.

Also, try not to use spaces or special symbols (?) in the names
of your fields, PerformanceManager is OK. Or blnPerformanceManager
to show that it is a boolean.

Wayne
 
Thanks for your help - it worked!!!! Brilliant!

One more question though. I now have a another report in which I don't want the zero values in one field to show. This is not a Yes/no field but a Text field in a combo box in a Table (the text options come from another table).

In my query, what criteria do i list to eliminate the fields with no text showing in the report?

In the previous query as it was a yes/no field I typed 'yes' in the criteria and it worked fine so i am assuming that there must be something to similar to put in when its a text field.

Any responses would be great.

Cheers, Lucy
 
you could restrict yourself to one query and use the Where clause of the open Report method assuming the report now in question is based on your original. Other then that the criteria is Not Null
 
Hi

I am not a compuer whizz and I don't understand what Rich explained below. Anyone able to explain in simple terms for me please?

Cheers, Lucy
 

Users who are viewing this thread

Back
Top Bottom