how to include count of a field?

S

Swaminathan

Hello,
Thanks first for any suggestions!
How can I include the count of a particular field from a
query in a form??
I have a field with many country names in a query. There
is a repetition of the same country several times.
In my form, I have a combo box with the list of countries.
I want to diplay the number of times the country has
appeared in the field.

Thanks,
With regards,
Swaminathan
 
J

John Spencer (MVP)

Use a totals (aggregate query) as the source of the combobox. Something like

SELECT CountryName, Count(CountryName) as TimesUsed
FROM YourTable
GROUP BY CountryName
 

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

Top