Since you have the 2 criteria on different lines, you get an "OR" comparison. The records returned meet the other criteria, so are returned. Sounds like you want the criteria on the same line, which gets you an "AND" comparison.
Because you have the Date criteria on a separate Criteria row, it is treated as an OR condition, that is return records where:
Either:
-The state code is not "IL"
OR
-The start date is prior to 7/1/213
That means if EITHER of those two conditions are met, the record will be returned.
If you want an AND condition, where you only want records to be returned where BOTH those conditions are met, you must put both those Criteria on the same criteria row.
EDIT: Sorry, I got interrupted on a phone call while typing up my response did not see Paul already replied.
I do want the or conditions that I am sure of because the next part of the assignment is to build one with an and condition. If I am reading that stuff right then with those conditions I should not see anything from "IL" right?
No, you'll still see records from IL if the date is less than 7/1/13. Read JoeM's explanation. If you had an NV record that was after 7/1/13, it would also be returned. It fails the date criteria but passes the <>IL criteria. Or means it only has to pass one or the other, not both.
Oh ok I am starting to get it now. But I need to get to work so I will have to play with it some more later. Thanks for all your help guys.
No problem, and welcome to the site by the way!
Thanks!!!!! So a little update when I had imported some data that it needed it didn't import all of it. That problem is now solved. So I deleted my queries to rebuild them. Now I have another problem. I built my query and now it doesn't show ANY data. I am really new to MS access so I am probably missing something obvious but here is what I have.![]()
This is the exact text in my textbook "Create a query that displays the GuestLast, City, State/Prov, ReservationID, StartDate, and EndDate fields for all guest from Illinois (IL). Do not include the State/Prov field in the query results. Sort the gquery in ascending order by cidy. Save the query and IllinoisGuests and then run it.
How do I change that?
Got it!!!!! Also all the criteria is showing good thanks for all your help guys!!!!!!!
Got another question about Calculated fields should I just make a new thread or ask in this one?
A brand new question that is not dependent on the previous question should go in a new thread, so it shows up as a new question.Got another question about Calculated fields should I just make a new thread or ask in this one?
Otherwise, most everyone who has not already replied to this thread won't see it as a new question.