By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

Text field counting

P: 1
Hi

I have a report that looks at no of products sold by customer by range.

The report groups on the range and I'm interested in counting the number of companies buying the range. Since they are grouped at query level I can rest assured that duplicates will not be included.

I've tried adding a dumb text box ([thisone]) and then adding a textbox on the group footer referencing ([thisone]) but that does'nt play ball.

BigSeries
is the group

and CustomerName is the field I'd like to count - breaking at each change in BigSeries grouping.

Hope this makes some kinda sense.

Thanks for any help on offer.

Cheers

Paul
Nov 6 '08 #1
Share this Question
Share on Google+
1 Reply


Expert Mod 2.5K+
P: 2,545
You are on the right track when you mention adding a textbox. All that is wrong is that you need to set the control source of that textbox to a suitable aggregate value. For counting you can use

=Count(*)

as the control source to count everything in the current group section.

If you do this in a textbox contained in a group footer or the report footer you will count all records in that group, or the whole report, respectively.

If you were summing a value rather than just counting you would need to set the control source to

=Sum([a numeric field])

where [a numeric field] is the name of a numeric field in your underlying query or table.

My guess as to why what you are doing isn't working at present is that you need to count something from the underlying query or table; trying to count or sum a value by referring to a count of or sum of the values of the unbound textboxes themselves will not work.

-Stewart
Nov 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.