Count within a report

A

Alex H

Hi,

In a report I need to count the number of instances where a field > 69, but
I cant seem to get the syntax correct. i have used in unbound field
=Count([fieldname]>69)
Thanks
A
 
W

Wayne Morgan

Another option would be to have a textbox in the detail section and set its
Running Sum property to Over All. For its Control Source use

=IIf([FieldName]>69, 1, 0)

This will cause 1 to be added for each value over 69 and 0 to be added for
lesser values. If you need to use this value in the report footer, just set
a textbox in the footer equal to this textbox.

=[NameOfTextboxInDetailSection]


Are you getting any errors with what you are currently using or do you just
get a blank textbox? If you are getting a #Name error, you may have a
textbox on the report with the same name as the field. If so, try changing
the name of the textbox and see if that helps.
 
J

John Spencer (MVP)

Count counts the existence of a value. True or False is a value.

Try
= Abs(Sum([Fieldname]>69))

This totals the trues (-1) and then the Abs function changes that to an unsigned
number. (Positive)
 

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

Similar Threads


Top