Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count values in report detail 1

Status
Not open for further replies.

SlykFX

Programmer
Oct 12, 2002
76
GB
ok, heres what i want to do

ive got a report using a query to select the required info from 3 tables

the query is working great, return the correct records from the table and the supporting data from the other 2 tables

i can get all this onto the report, but i need to list it in such a way that:
only 1 instance of the value is output, but a count of the number of times that value is returned is kept

e.g.
for the detail section ive got a country being listed, there is no limit to the number of countries returned, nor the number of times a specific country is returned
so instead of getting
United Kingdom
United Kingdom
Australia
Argentina
Argentina
Argentina

i want
United Kingdom 2
Australia 1
Argentina 3

any help is much appreciated
thanks in advance

I can't be bothered to have a sig!
 
Are you familiar with totals/group by queries? You could group by Country and Count Country to get your desired output to send to the report.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
no im not familiar with those

i dont normally use access in this way (reports and the like) only really use it for web front ends

I can't be bothered to have a sig!
 
I would suggest a simple query:
SELECT Country, Count(Country) as NumOf
FROM qYourQuery
GROUP BY Country;
However, since you had to join 3 tables to get one country, I think your issue is a bit more complex.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
thanks for that

ive managed to get the majority of it sorted now with that

thanks again

I can't be bothered to have a sig!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top