Criteria Question

PLS1390

New member
Local time
Yesterday, 20:44
Joined
Mar 9, 2015
Messages
3
In General:
I have a form that is to display records from my table based on if a certain field has been checked True. However, I have one situation in which I want to include a record in this form based on the value of a second field when the first field is false.

In other words:
I want to include all records that has the field "Field done" checked as True (This is a True/False field in the table)

I also want to include all records that have the field "Color Code" = "O", and the "Field Done" field = False.

Is this doable?

I have this so far:
IIf([Color Code]="O",False,True)

I have put this in the criteria field of the "Field Done" field on my query. However this is not working.

Help!
 
In the "Where" part of you query, you type in:
Where [Field done]=-1 Or [Color Code] = "O" and [Field Done] = 0
 
JHB, thanks for the response. I am not sure I am fully understanding your comment. I don't think I am including this in the correct syntax. I have tried many iterations but none do what I need. My query field looks like this:

WHERE ((([Survey Schedule].[Field done])=True) OR [Survey Schedule].[Color Code])="o" And [Survey Schedule].[Field done])=False)) AND (([Survey Schedule].Complete)=False) AND (([Survey Schedule].Delivered)=False) AND (([Survey Schedule].[Mapping or Drafting Needed])=True) AND (([Survey Schedule].[Mapping Done])=False))
 
Something like this is what you need,
Code:
WHERE (([Survey Schedule].[Field done] = True) Or (([Survey Schedule].[Color Code] = "o") AND ([Survey Schedule].[Field done] = False)))
 
What do you not understand from my comments?
I see you query has a lot more criterias as told, so could you please elaborate!
What do you need then?
 
JHB, I eliminated all the other criteria and used both your string and the string that pr2-eugin suggested. The query brings back all records instead of the intended results. Here is the way it was originally set up.

WHERE ((([Survey Schedule].[Field done])=True) AND (([Survey Schedule].Delivered)=False) AND (([Survey Schedule].[Mapping or Drafting Needed])=True) AND (([Survey Schedule].[Mapping Done])=False))

I am wanting to add an additional clause that if the Color Code field has an "O" in it, that it will be included even if the field done value is false.
 
What gives the below?
WHERE ((([Survey Schedule].[Field done])=True) AND (([Survey Schedule].Delivered)=False) AND (([Survey Schedule].[Mapping or Drafting Needed])=True) AND (([Survey Schedule].[Mapping Done])=False)) Or [Color Code] = "O" and [Field Done]=False
 

Users who are viewing this thread

Back
Top Bottom