Count Query

K

Kevin

I am working on a database for a tree farm. I have several queries
setup to return results for various types of trees. Results show the
date it was bought, type, height and the quantity.

I would like to setup another query that returns results for trees that
were bought over 10 feet in height. When I do this it returns duplicate
values for the same tree. For instance...

The query for a Balsam tree returns this:

11/25/05 Balsam 14' 2 (Date, Type, Height and Quantity)



The query for trees over 10 feet returns this:

11/25/05 Balsam 14' 2 (Date, Type, Height and Quantity)
11/25/05 Balsam 14' 2 (Date, Type, Height and Quantity)

Here I have duplicate entries for the same tree. How can I use the
count function or any expression for that matter to eliminate the
duplicates?
 
G

Guest

Hi Kevin,

You can use the group by option. Click on the toolbar button in query design
view that looks like the Greek sigma sign. You should see a new row in the
QBE (Query by Example) grid that reads Group By.

You can also run the Find Duplicates Query wizard. This will help you to
locate duplicate records, so that you can decide which records to delete.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
K

Kevin

Tom,

Thanks much. I was able to work out the issue. The DB has taken off in
a new direction already so I'm sure there'll be plenty more questions.

Thank again.
 

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