Only if 1 of 3 checked

D

Dan @BCBS

I am trying to get a report to open only if one of three values are true.
This is my query:
SELECT t_Contact.ICNNO, t_Contact.Incomplete, t_Contact.Incorrect,
t_Contact.Missing, t_Contact.Comments, t_Contact.CSR, t_Contact.CSRMgr,
t_Contact.CSRRACF
FROM tblTrackingData INNER JOIN t_Contact ON tblTrackingData.ICNNO =
t_Contact.ICNNO;

How can I make the report only print records were "Incomplete, Incorrect or
Missing" has been checked?


Suggestions?
 
J

Jeff Boyce

Where are these "values"?

Are you saying that you have three separate Yes/No fields?

Are you saying that you need to see "at least" one of the three checked, or
"ONLY" one-of-three?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Dan @BCBS

The values originate in a seperate table, linked to a main table via a query,
then the report is created via that query. When the report is opened values
from the main table are present and then the user checks one, two or all
three of these values (Yes/No). If all three are left blank I do not want
any data from that record to apprear on the report. So, yes the user must
check at least one.

I think that address your questions.
Thank you
 
J

Jeff Boyce

While I still don't have a very clear picture of your data structure, and
whether you are working directly in the tables (not good!) or via forms, I
think the way you check to see if at least one of those is checked is to
"add" them.

If they are true Yes/No fields, adding the three will produce a value of 0
if all are False (or No), and a non-zero value if at least one is True/Yes.
Test for non-zero in your validation routine.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Dan @BCBS

That made sense, this is what I plugged in and it works perfect.
Checked: IIf([Incomplete]=True Or [Incorrect]=True Or [Missing]=True,1,0)

And asked for only True values.

Thanks
 

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