Report pulling to much from query.

S

SDH@DJ

I have a table with fields containing "Correct", "Incorrect" and "N/A". I
have created a query to pull any field with a criteria of "Incorrect". Now I
have a report that generates from that query. How do I get the report to
only show the field with an "Incorrect" rather than showing the entire record
with one field marked "incorrect"?

Thanks
 
G

George Nicholson

As I understand it:
- you have fields called Field1, Field2, Field3 (or something)
- Each field might contain "Incorrect" or some other value
- Your query selects those records where "Incorrect" appears in at least
one field

To have a report display only those fields in each record which contain
"Incorrect":
(i.e., if a field doesn't contain "Incorrect", it would appear empty). I
can think of 3 ways:

At the query level:
- In addition to using "Incorrect" to specify record output as you are
now, use it to specify field output as well:
Field1:= iif([Field1]="Incorrect","Incorrect","")

At the Report level:
-as the controlSource for each relevant textbox:
= iif([Field1]="Incorrect","Incorrect","")

or

-in the Detail_Format event:
Me.txtField1.Visible = (me.txtField1 = "Incorrect")

Adjust & repeat as necessary for Field2, Field3, etc.

HTH,
 

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