Criteria

  • Thread starter Thread starter Carrie
  • Start date Start date
C

Carrie

I am running a query in Access 2007 and when I view it there are a lot of
duplicates. What is the criteria for not showing duplicates when I view the
query?
 
Carrie said:
I am running a query in Access 2007 and when I view it there are a lot of
duplicates. What is the criteria for not showing duplicates when I view the
query?


Rather than waste you time figuring out how to hide
duplicate results in a query, you should chase down the
reason for the duplicates. Most likely your query is
joining two (or more) tables that have little or nothing to
do with the desired results.

If your query is only based on one table, then the duplicate
records are in the table, which is a gross violation of the
rules of database Normalization.

If you are only displaying a few data fields that do not
include a unique indexed field, then you can set the queies
Unique Values property to suppress the duplicates. Note
that this kind of query in not updatable.
 
I am running a query in Access 2007 and when I view it there are a lot of
duplicates. What is the criteria for not showing duplicates when I view the
query?

As Marshall said, it's probably best to fix the query instead. Criteria will
NOT do this for you!

Perhaps you could open the query in design view, select View... SQL from the
menu, and post the SQL text here. Someone may be able to see what can be done
to improve the query design. Some explanation of your tables and perhaps a row
or two of sample data would help.
 
the reason for the duplicates is most lily due to a 1 to many joined
table and not selecting the values form the many table

to resolve this open the query

click view in the menu bar
click sql view

replace SELECT with SELECT DISTINCT

then run the query

Regards
Kelvan
 
Back
Top