Get unique results

  • Thread starter Thread starter mohd21uk via AccessMonster.com
  • Start date Start date
M

mohd21uk via AccessMonster.com

I have a table in an Access database which contains two fields WBS Code and
User Name. For each WBS code I would like the unique names. I have provided
an example below to illustrate this:

WBS Code Name
E0050.10 James
E0050.10 John
E0050.10 Mark
E0050.10 John
E0050.10 Mark
E0050.10 James
E0051.20 Steven
E0051.20 George
E0051.20 Steven
E0051.20 George


Required Output:

E0050.10 James
E0050.10 John
E0050.10 Mark
E0051.20 Steven
E0051.20 George

Many Thanks,
 
SELECT DISTINCT [WBS Code], [User Name] FROM MyTable

To do this through the GUI, create a query that returns the two fields, then
look at the properties of the query (make sure it's the properties of the
query, not of a field in the query). You should see a property named "Unique
Values". Set it to Yes. (leave the "Unique Records" alone: it's something
different)
 
Back
Top