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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about queries.

Status
Not open for further replies.

kjspear

Programmer
Feb 13, 2002
173
US
Hello again everyone.

I'm having an ongoing struggle to get Access to locate and count the number records in a query. Here's what I'm trying to do,

Rec CSR
1 MA
2 LJ
3 MA
4 LJ


Totat MA: 2 LJ: 2

I would like this on my report.

I tried several ways. I think I'm having problems understanding queries. Is there a simple way to do this in the report? Can I use a calculation formula in a text field in the report? I'd rather not group anything because I rather make it look like the fomat above.

Please let me knowif this isn't clear.

Any assistance would be greatly appreciated.

Thanks
KJ
 
This will return the data you want

SELECT count(*) as REC ,CSR
FROM mytable group by csr
ORDER BY CSR
 
If you want to display them horizontally, you can set up your report layout as multi-column.
You could also hide the detail section of the report and create text boxes with control sources of:
=Sum(Abs(CSR="MA"))
and
=Sum(Abs(CSR="LJ"))

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top