Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / October 2007

Tip: Looking for answers? Try searching our database.

Query to look at multiple lines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jake F - 25 Oct 2007 21:49 GMT
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.
KARL DEWEY - 25 Oct 2007 23:05 GMT
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?

Signature

KARL DEWEY
Build a little - Test a little

> 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.
Jake F - 26 Oct 2007 16:58 GMT
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.

> It must late in the day.  
> Do you not want to count them if they have both a positive and a negative?
[quoted text clipped - 7 lines]
> > something to say count this person if they have a positive and a negativeso
> > that access is looking at both lines?  Thanks.
KARL DEWEY - 26 Oct 2007 18:11 GMT
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.
Signature

KARL DEWEY
Build a little - Test a little

> 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
[quoted text clipped - 11 lines]
> > > something to say count this person if they have a positive and a negativeso
> > > that access is looking at both lines?  Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.