count function

  • Thread starter Thread starter wbfuga
  • Start date Start date
W

wbfuga

Please,help me. This should be simple but it is not....

I have created a report, on this report in the detail
secion I have a field naved CONTACT_TYPE that contains
either a null value or "Boss". I need to creat a
calculation in the report footer that says "Total No. of
Persons with a Contact Type of "Boss" , then I need to
total this field. What I have done is created an unbound
text box,

=IIF([CONTACT_TYPE]="Boss",1)

I named this text box BOSS

this gives me a numeric value of 1 next to each instance
of "Boss" in the table,I will later make this invisible.
I then thought I could go to the footer and create
another unbound text box and count all the 1's. In this
text box I put:

=Count([BOSS])

All I get is an error.

Help!
 
Thanks, but where does the total of the "1" representing
Boss come in? Do I put this formula in the footer
instead of =Count([BOSS])? or is this just one query,
skipping the text box I placed in the detail section?

Sorry, I have been trying to figure this out all day and
am a bit confused....
-----Original Message-----
=Sum(Abs(([CONTACT_TYPE]="Boss"))
--
Duane Hookom
MS Access MVP


Please,help me. This should be simple but it is not....

I have created a report, on this report in the detail
secion I have a field naved CONTACT_TYPE that contains
either a null value or "Boss". I need to creat a
calculation in the report footer that says "Total No. of
Persons with a Contact Type of "Boss" , then I need to
total this field. What I have done is created an unbound
text box,

=IIF([CONTACT_TYPE]="Boss",1)

I named this text box BOSS

this gives me a numeric value of 1 next to each instance
of "Boss" in the table,I will later make this invisible.
I then thought I could go to the footer and create
another unbound text box and count all the 1's. In this
text box I put:

=Count([BOSS])

All I get is an error.

Help!


.
 
If all you want to do is count the number of time that Contact Type is Boss
then just add a text box to your group or report footer/header with a
control source as I suggested.

--
Duane Hookom
MS Access MVP


wbfuga said:
Thanks, but where does the total of the "1" representing
Boss come in? Do I put this formula in the footer
instead of =Count([BOSS])? or is this just one query,
skipping the text box I placed in the detail section?

Sorry, I have been trying to figure this out all day and
am a bit confused....
-----Original Message-----
=Sum(Abs(([CONTACT_TYPE]="Boss"))
--
Duane Hookom
MS Access MVP


Please,help me. This should be simple but it is not....

I have created a report, on this report in the detail
secion I have a field naved CONTACT_TYPE that contains
either a null value or "Boss". I need to creat a
calculation in the report footer that says "Total No. of
Persons with a Contact Type of "Boss" , then I need to
total this field. What I have done is created an unbound
text box,

=IIF([CONTACT_TYPE]="Boss",1)

I named this text box BOSS

this gives me a numeric value of 1 next to each instance
of "Boss" in the table,I will later make this invisible.
I then thought I could go to the footer and create
another unbound text box and count all the 1's. In this
text box I put:

=Count([BOSS])

All I get is an error.

Help!


.
 
Thank you, but when I do this all I receive is an error.
I appreciate the help, perhaps I am putting in an extra
space or something??? I'll keep trying. Also, would
something like this work if I wanted a not null count?
like
=Sum(Abs(([CONTACT_TYPE]Is Not Null)).

-----Original Message-----
If all you want to do is count the number of time that Contact Type is Boss
then just add a text box to your group or report footer/header with a
control source as I suggested.

--
Duane Hookom
MS Access MVP


Thanks, but where does the total of the "1" representing
Boss come in? Do I put this formula in the footer
instead of =Count([BOSS])? or is this just one query,
skipping the text box I placed in the detail section?

Sorry, I have been trying to figure this out all day and
am a bit confused....
-----Original Message-----
=Sum(Abs(([CONTACT_TYPE]="Boss"))
--
Duane Hookom
MS Access MVP


"wbfuga" <[email protected]> wrote
in
message
Please,help me. This should be simple but it is not....

I have created a report, on this report in the detail
secion I have a field naved CONTACT_TYPE that contains
either a null value or "Boss". I need to creat a
calculation in the report footer that says "Total
No.
of
Persons with a Contact Type of "Boss" , then I need to
total this field. What I have done is created an unbound
text box,

=IIF([CONTACT_TYPE]="Boss",1)

I named this text box BOSS

this gives me a numeric value of 1 next to each instance
of "Boss" in the table,I will later make this invisible.
I then thought I could go to the footer and create
another unbound text box and count all the 1's. In this
text box I put:

=Count([BOSS])

All I get is an error.

Help!


.


.
 
What exact expression did you try? Did you try your suggestion? It takes 15
seconds to try it?
What do you mean by "receive ... an error"? It does look like I missed a
closing ")"
=Sum(Abs([CONTACT_TYPE]="Boss"))

--
Duane Hookom
MS Access MVP


wbfuga said:
Thank you, but when I do this all I receive is an error.
I appreciate the help, perhaps I am putting in an extra
space or something??? I'll keep trying. Also, would
something like this work if I wanted a not null count?
like
=Sum(Abs(([CONTACT_TYPE]Is Not Null)).

-----Original Message-----
If all you want to do is count the number of time that Contact Type is Boss
then just add a text box to your group or report footer/header with a
control source as I suggested.

--
Duane Hookom
MS Access MVP


Thanks, but where does the total of the "1" representing
Boss come in? Do I put this formula in the footer
instead of =Count([BOSS])? or is this just one query,
skipping the text box I placed in the detail section?

Sorry, I have been trying to figure this out all day and
am a bit confused....

-----Original Message-----
=Sum(Abs(([CONTACT_TYPE]="Boss"))
--
Duane Hookom
MS Access MVP


message
Please,help me. This should be simple but it is not....

I have created a report, on this report in the detail
secion I have a field naved CONTACT_TYPE that contains
either a null value or "Boss". I need to creat a
calculation in the report footer that says "Total No.
of
Persons with a Contact Type of "Boss" , then I need to
total this field. What I have done is created an
unbound
text box,

=IIF([CONTACT_TYPE]="Boss",1)

I named this text box BOSS

this gives me a numeric value of 1 next to each
instance
of "Boss" in the table,I will later make this
invisible.
I then thought I could go to the footer and create
another unbound text box and count all the 1's. In this
text box I put:

=Count([BOSS])

All I get is an error.

Help!


.


.
 
Remove the ">"
=Sum(Abs(([CONTACT_TYPE]Is Not Null)).
How this works is, ([CONTACT_TYPE]Is Not Null) returns a
true which is "-1".
Abs(-1) return 1
and than you sum the total.
Hope this helps.
Fons
-----Original Message-----
Thank you, but when I do this all I receive is an error.
I appreciate the help, perhaps I am putting in an extra
space or something??? I'll keep trying. Also, would
something like this work if I wanted a not null count?
like
=Sum(Abs(([CONTACT_TYPE]Is Not Null)).

-----Original Message-----
If all you want to do is count the number of time that Contact Type is Boss
then just add a text box to your group or report footer/header with a
control source as I suggested.

--
Duane Hookom
MS Access MVP


Thanks, but where does the total of the "1" representing
Boss come in? Do I put this formula in the footer
instead of =Count([BOSS])? or is this just one query,
skipping the text box I placed in the detail section?

Sorry, I have been trying to figure this out all day and
am a bit confused....

-----Original Message-----
=Sum(Abs(([CONTACT_TYPE]="Boss"))
--
Duane Hookom
MS Access MVP


message
Please,help me. This should be simple but it is not....

I have created a report, on this report in the detail
secion I have a field naved CONTACT_TYPE that contains
either a null value or "Boss". I need to creat a
calculation in the report footer that says "Total No.
of
Persons with a Contact Type of "Boss" , then I need to
total this field. What I have done is created an
unbound
text box,

=IIF([CONTACT_TYPE]="Boss",1)

I named this text box BOSS

this gives me a numeric value of 1 next to each
instance
of "Boss" in the table,I will later make this
invisible.
I then thought I could go to the footer and create
another unbound text box and count all the 1's. In this
text box I put:

=Count([BOSS])

All I get is an error.

Help!


.


.
.
 
Back
Top