Return Unique records only

S

SueM

Hi there,

I want to run a query on age groups in a data table I
have.

The data table contains lifestages (Infant, child,
preteen, adult male, adult female) as well as age groups,
and a few other details.

When I run a query to get only the age groups some of the
records double up because they are entered for both adult
males and adult females. Is there a simple way in the
criteria to let access know that I only want unique
records?
 
V

Van T. Dinh

Try using the keyword "DISTINCT" in your Query like:

SELECT DISTINCT LifeStage ...

Check Access Help on the keyword "DISTINCT".

HTH
Van T. Dinh
MVP (Access)
 
S

SueM

Thanks!

Turned out all I needed to do was add the word distinct to
the selection line in my row source in the properties of
my combobox(I was querying for data for a combo box).

They help files also mentioned that the properties in a
query can be changed to unique - but this didn't work for
me. Apparently the query has to be over two tables for
that one to work.

Thanks again! I'm a very happy customer.
 

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

Similar Threads


Top