Return Uniques

  • Thread starter Thread starter MeSteve
  • Start date Start date
M

MeSteve

I have 2 qry's the same thing just different criteria in RoleID. I am trying
to sort by LastName. In one it lets me, in the other I get an error that my
sort conflicts tieh DISTINCT. Why the different behavior? Thanks.
 
I copy/pasted the SQL statement and changed the criteria and it works. They
looked the same before though. ???
 
I usually get this message on a DISTINCT query when I've not included the
field I am sorting by in the SELECT clause.

Access requires that any field you sort by must be in the SELECT clause in a
DISTINCT query. If you are not using DISTINCT then the field does not have
to be in the SELECT clause.

If you are using the query grid, setting Unique Values to Yes adds the
DISTINCT operator to the query.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
That makes perfect sense, except I built the qry using the design grid and
set uniques in the properties. I will chalk this one up to laws of computer
randomness. Thanks
 
Back
Top