469,575 Members | 1,441 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Text field counting

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
1 1328
Stewart Ross
2,545 Expert Mod 2GB
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.

Similar topics

2 posts views Thread by Cliff72 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.