Search Query of two tables

  • Thread starter bml337 via AccessMonster.com
  • Start date
B

bml337 via AccessMonster.com

I am trying to create a query that will enable me to search my client list
against another list to see if there are any matches. Basically in my
business I have to “scrub†my client list against a “blocked persons†list,
which is sent to me in a spread sheet.

For example lets say I had two tables. Table 1 would be the “block personsâ€
list with a field called FULL NAME. The 2nd table would be my client list
with a field called FULL NAME as well.

Now I want to create a query that will show me if any of my customers show up
on the “blocked persons†list. Or can I show another column next to the name
of my client that has a count of matches (hits), if any.
 
K

KARL DEWEY

Now I want to create a query that will show me if any of my customers show up
on the “blocked persons†list.
Create a query in design view by adding both tables. Click on 'FULL NAME'
in first table and drag to 'FULL NAME' in the second table. Double click on
the asterisk in your table to select all fields for display.
When you run the query it will display those records that are in both tables.
 
B

bml337 via AccessMonster.com

ok o have got this far already, but how do i show only the matching records
in from each query/table. i dont want or need to see everything i have
thousands of names.

KARL said:
on the “blocked persons†list.
Create a query in design view by adding both tables. Click on 'FULL NAME'
in first table and drag to 'FULL NAME' in the second table. Double click on
the asterisk in your table to select all fields for display.
When you run the query it will display those records that are in both tables.
I am trying to create a query that will enable me to search my client list
against another list to see if there are any matches. Basically in my
[quoted text clipped - 8 lines]
on the “blocked persons†list. Or can I show another column next to the name
of my client that has a count of matches (hits), if any.
 
K

KARL DEWEY

If you had tried as I suggested you would have seen that when you join the
two tables the ONLY records that are displayed in the results ARE IN BOTH
tables!
--
KARL DEWEY
Build a little - Test a little


bml337 via AccessMonster.com said:
ok o have got this far already, but how do i show only the matching records
in from each query/table. i dont want or need to see everything i have
thousands of names.

KARL said:
Now I want to create a query that will show me if any of my customers show up
on the “blocked persons†list.
Create a query in design view by adding both tables. Click on 'FULL NAME'
in first table and drag to 'FULL NAME' in the second table. Double click on
the asterisk in your table to select all fields for display.
When you run the query it will display those records that are in both tables.
I am trying to create a query that will enable me to search my client list
against another list to see if there are any matches. Basically in my
[quoted text clipped - 8 lines]
on the “blocked persons†list. Or can I show another column next to the name
of my client that has a count of matches (hits), if any.
 
B

bml337 via AccessMonster.com

can you do the same thing with a query, if so how?

KARL said:
If you had tried as I suggested you would have seen that when you join the
two tables the ONLY records that are displayed in the results ARE IN BOTH
tables!
ok o have got this far already, but how do i show only the matching records
in from each query/table. i dont want or need to see everything i have
[quoted text clipped - 11 lines]
 
K

KARL DEWEY

can you do the same thing with a query, if so how?
From my earlier post ---
Create a query in design view by adding both tables. Click on 'FULL NAME'
in first table and drag to 'FULL NAME' in the second table. Double click on
the asterisk in your table to select all fields for display.
When you run the query it will display those records that are in both tables.

--
KARL DEWEY
Build a little - Test a little


bml337 via AccessMonster.com said:
can you do the same thing with a query, if so how?

KARL said:
If you had tried as I suggested you would have seen that when you join the
two tables the ONLY records that are displayed in the results ARE IN BOTH
tables!
ok o have got this far already, but how do i show only the matching records
in from each query/table. i dont want or need to see everything i have
[quoted text clipped - 11 lines]
on the “blocked persons†list. Or can I show another column next to the name
of my client that has a count of matches (hits), if any.
 
B

bml337 via AccessMonster.com

I have it working when i use two tables in one query. However, My issue is
this... both tables have different layouts. One table has the first and last
name in one cell and the other has them separated. this is just one example.
So i had to create a query for each of the tables so they both have the same
layout. After i did this i had to create another query and based it on the
aforementioned. when i do that... dupes in each do not come up, any
suggestions.

and thank you for your help! :)

bl

KARL said:
From my earlier post ---
Create a query in design view by adding both tables. Click on 'FULL NAME'
in first table and drag to 'FULL NAME' in the second table. Double click on
the asterisk in your table to select all fields for display.
When you run the query it will display those records that are in both tables.
can you do the same thing with a query, if so how?
[quoted text clipped - 6 lines]
 
K

KARL DEWEY

when i do that... dupes in each do not come up, any suggestions.
To me 'dupes' are duplicate records in the same table and I would use a
totals query to count records that are >1. But this is in a single table.

--
KARL DEWEY
Build a little - Test a little


bml337 via AccessMonster.com said:
I have it working when i use two tables in one query. However, My issue is
this... both tables have different layouts. One table has the first and last
name in one cell and the other has them separated. this is just one example.
So i had to create a query for each of the tables so they both have the same
layout. After i did this i had to create another query and based it on the
aforementioned. when i do that... dupes in each do not come up, any
suggestions.

and thank you for your help! :)

bl

KARL said:
can you do the same thing with a query, if so how?
From my earlier post ---
Create a query in design view by adding both tables. Click on 'FULL NAME'
in first table and drag to 'FULL NAME' in the second table. Double click on
the asterisk in your table to select all fields for display.
When you run the query it will display those records that are in both tables.
can you do the same thing with a query, if so how?
[quoted text clipped - 6 lines]
on the “blocked persons†list. Or can I show another column next to the name
of my client that has a count of matches (hits), if any.
 
B

bml337 via AccessMonster.com

i have two sets of tables. each has a list of names and other information.
Im looking to see if each table has a matching name in the other table, thats
all.

KARL said:
To me 'dupes' are duplicate records in the same table and I would use a
totals query to count records that are >1. But this is in a single table.
I have it working when i use two tables in one query. However, My issue is
this... both tables have different layouts. One table has the first and last
[quoted text clipped - 20 lines]
 
K

KARL DEWEY

So i had to create a query for each of the tables so they both have the same
layout. After i did this i had to create another query and based it on the
aforementioned. when i do that... dupes in each do not come up, any
suggestions.

If you join the two queries you do not get any records?
Post SQL of the queries you are trying to use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top