PDA

View Full Version : (Probably) embarassingly easy Access question


phdmom
04-18-2002, 10:43 AM
How can I count (or select for that matter) distinct records?? If I try to count (say) policy number, when there are several records with the same policy number, it just counts all the records in the table. I want to know how many distinct policy numbers there are.

I'm new at Access, used to using Paradox, but trying to learn Access. I couldn't find anything about this in the Access "help". I keep thinking, I could do this in one second in Paradox....

General Kenobi (ret.)
04-18-2002, 10:50 AM
Create your query as you normally would. In your example, make policy number the only field. Right-click in the upper part of the query design box and choose to look at the properties. Under the query properties, look for "Unique Values" and set that to "Yes".

Cho Da
04-18-2002, 10:52 AM
With your query open in design mode, select View Properties
In the Properties dialog box set "Unique Values" to yes. This has the effect of putting the <tt>DISTINCT</tt> keyword in the SQL <tt>SELECT</tt> statement.

phdmom
04-18-2002, 10:54 AM
Thank you!!

Ron Weasley
04-18-2002, 10:59 AM
Nevermind (deleted)