Query to look at multiple lines

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my database, if a person tests and gets a positive then can test again to
get a negative. These are recorded as individual tests with one result
positive and one negative. Is there a way to count or exlude someone in a
query based on both those tests together? I'm not sure if I can use
something to say count this person if they have a positive and a negativeso
that access is looking at both lines? Thanks.
 
It must late in the day.
Do you not want to count them if they have both a positive and a negative?
Do you not want to count them if they have a negative?
Do you not want to count them if they only have a positive?
 
Specifically I'd like to count them if they have a positive first and then a
negative. I'm just curious if a query can look at two lines like that or if
it can only see the one line.
 
Yes you can IF you have a field to determine which is first. In query design
view place your table twice.
Access will add a suffix to the second instance of the table like this --
MyTable_1
The criteria on second table field will use first table field calculated to
offset by one record. Example using dates less or greater than other.
If you can follow this then ok. If not then post table & field names, and
datatype with sample data.
 
Back
Top