You don't put it as a field in the query. The entire query has to be
declared as Distinct. You do that either by going into the SQL view, or by
looking at the Properties for the query and setting the UniqueValues
property to Yes.
(Tom's right, though. When you're dealing with fields in tables, you use
., not !)
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
rqwatson said:
Thanks Tom, I must be doing something wrong. I keep getting syntax
error:
Here is exactly what I have:
Expr1: (Select Distinct [Workload data]![Contract])
I have serveral lines with the same contract numbers, but I only want to
count it once.
Thanks again.
Tom Lake said:
Man, I have been away for Access for some time. But for the life of
me, I can not seem to get the sintax correct for Select Distinct
Function.
I tryed to do the help function but no examples...
Should it not be select distinct [name] ?
SELECT DISTINCT [tablename].fieldname [, [tablename].fieldname, ....]
Tom Lake