Repetitive Name

T

Té

I have a 2 tables which I'm using to create a query. When I create my query
I am getting duplicate names when I run the query. Why is this?
 
F

fredg

I have a 2 tables which I'm using to create a query. When I create my query
I am getting duplicate names when I run the query. Why is this?

Usually it's because you have 2 table in teh query that have no
relationship to one another.
If the tables have a common field, establish a relationship, i.e.
Table1 ID field to Table2 ID field.
 
K

Ken Sheridan

If there is more than one row in the second table which matches a single row
in the table of names then you'll get duplicate rows per name for however
many matches there are for that name's row in the second table. This will be
the case even if the query only returns columns from the 'names' table, with
the second table being used merely to restrict the names returned. In this
case you can suppress the duplicates by using a SELECT DISTINCT query. To
do this in design view open the query's properties sheet and select 'Yes' for
the Unique Values property.

If you are returning values from the second table in the query as well as
from the first and these values are not the same for each name then you'll
still get more than one row per name, even with a SELECT DISTINCT query.

Ken Sheridan
Stafford, England
 
Top