counting records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that I need to have a count of the number of records. I also
have 1 column that I need to have an average. My report format looks
something like this:
***
Field1 Field2 Field3 Field4 Field5
x x 14
x 3
x 5

Total Number Field1: ___
Total Number Field2: ___
Avg Number Field4: ___
***
I tried =count([Field1]), but I get an error message.

Thanks in advance.
Donna
 
Did you place the Count() text box in the Page Footer? If so, it won't work.
You could use a group or report footer.

I assume you understand that =Count([Field1]) will count all non-null Field1
values.
 
I have the text boxes in the page footer. Please forgive me for my blonde
moment, but if I'm wanting to count the number of x's in the column titled
field1 can you write out the code that I need to use? I'm entering this code
in the control source block in the properties for this field, correct?

Duane Hookom said:
Did you place the Count() text box in the Page Footer? If so, it won't work.
You could use a group or report footer.

I assume you understand that =Count([Field1]) will count all non-null Field1
values.

--
Duane Hookom
MS Access MVP
--

Dcbrown428 said:
I have a report that I need to have a count of the number of records. I
also
have 1 column that I need to have an average. My report format looks
something like this:
***
Field1 Field2 Field3 Field4 Field5
x x 14
x 3
x 5

Total Number Field1: ___
Total Number Field2: ___
Avg Number Field4: ___
***
I tried =count([Field1]), but I get an error message.

Thanks in advance.
Donna
 
First move your text boxes to a different footer section.

What type of field is [Field1]? Is it a yes/no? Is it a text field with two
possible values "X" and Null?

If it is a text field and you want to count the number of times the field
contains the value "X", try:

=Abs(Sum([Field1]="x"))

--
Duane Hookom
MS Access MVP


Dcbrown428 said:
I have the text boxes in the page footer. Please forgive me for my blonde
moment, but if I'm wanting to count the number of x's in the column titled
field1 can you write out the code that I need to use? I'm entering this
code
in the control source block in the properties for this field, correct?

Duane Hookom said:
Did you place the Count() text box in the Page Footer? If so, it won't
work.
You could use a group or report footer.

I assume you understand that =Count([Field1]) will count all non-null
Field1
values.

--
Duane Hookom
MS Access MVP
--

Dcbrown428 said:
I have a report that I need to have a count of the number of records. I
also
have 1 column that I need to have an average. My report format looks
something like this:
***
Field1 Field2 Field3 Field4 Field5
x x 14
x 3
x 5

Total Number Field1: ___
Total Number Field2: ___
Avg Number Field4: ___
***
I tried =count([Field1]), but I get an error message.

Thanks in advance.
Donna
 
Back
Top