A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Exclude records in qry1 if the same record ID is found in qry2 ..



 
 
Thread Tools Display Modes
  #1  
Old November 20th, 2006, 02:28 PM posted to microsoft.public.access.queries
Silvio
external usenet poster
 
Posts: 140
Default Exclude records in qry1 if the same record ID is found in qry2 ..

In short: I have two join query, qryJoinApproved and qry JoinPending. How can
I excluded rercords from showing in qryJoinApproved if the same record ID is
found in qryJoinPending.
  #2  
Old November 20th, 2006, 02:48 PM posted to microsoft.public.access.queries
David F Cox
external usenet poster
 
Posts: 493
Default Exclude records in qry1 if the same record ID is found in qry2 ..

Join the two queries, setting a Left Join (click on join line, set all from
A and only those from B ..) and set criteria for the join field in B IS
NOT NULL


"Silvio" wrote in message
...
In short: I have two join query, qryJoinApproved and qry JoinPending. How
can
I excluded rercords from showing in qryJoinApproved if the same record ID
is
found in qryJoinPending.



  #3  
Old November 20th, 2006, 09:57 PM posted to microsoft.public.access.queries
Silvio
external usenet poster
 
Posts: 140
Default Exclude records in qry1 if the same record ID is found in qry2

David thank you for your replay, however I don't full understand the steps I
need to take, If you would please be more specific step-by-step (setting a
Left Join, click on join line?????)

Thank you,
Silvio

"David F Cox" wrote:

Join the two queries, setting a Left Join (click on join line, set all from
A and only those from B ..) and set criteria for the join field in B IS
NOT NULL


"Silvio" wrote in message
...
In short: I have two join query, qryJoinApproved and qry JoinPending. How
can
I excluded rercords from showing in qryJoinApproved if the same record ID
is
found in qryJoinPending.




  #4  
Old November 21st, 2006, 02:07 AM posted to microsoft.public.access.queries
David F Cox
external usenet poster
 
Posts: 493
Default Exclude records in qry1 if the same record ID is found in qry2

I am asuming minimal knowledge as I do not know what you know.
Open a new query in the normal query design window.
In the add tables dialogue select queries, and add your two queries.
Click on the record id in one query and drag it over the corresponding
record id in the other query and release the mouse button. (Drag and drop).
You should see a line joining these two fields. This is called a join. If
you look at it in SQL view you will see that it is an inner join. This query
will select all of the records that match.
Diouble click on that join line. A join properties window should appear.
Click on the option that gives you all of the records from the query that
you want and only those that match from the other.
If you look at SQL view you will see that this is now either a LEFT JOIN or
a RIGHT JOIN.
The record id from the ALL table will be present in all lines returned from
this query, whilst the record id in the "Only matched" table will sometimes
be NULL, because there is no record that matches.
A test for NULL in the record id of "Only matched" table will identify those
that do not have matches.
So IS NULL in the Criteria for that record id will identify the records
that you want, those that do not have a match.

I hope you can make sense of this explanation, it is late here, and I have
struggled a bit.

As long as you are not changing anything, it does not hurt to experiment and
look at the results and the SQL generated.. You will get a feel for it.

"Silvio" wrote in message
...
David thank you for your replay, however I don't full understand the steps
I
need to take, If you would please be more specific step-by-step (setting a
Left Join, click on join line?????)

Thank you,
Silvio

"David F Cox" wrote:

Join the two queries, setting a Left Join (click on join line, set all
from
A and only those from B ..) and set criteria for the join field in B
IS
NOT NULL


"Silvio" wrote in message
...
In short: I have two join query, qryJoinApproved and qry JoinPending.
How
can
I excluded rercords from showing in qryJoinApproved if the same record
ID
is
found in qryJoinPending.







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.