Report question

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

Guest

lets say I have 2 fields 1. year (2004 or 2005) and 2. hospital
admits......In the report, I can add those together in the report
footer.....HOWEVER, what if I wanted to add JUST 1 year instead of both????
(i.e total 2004 sum of the admits)
=sum([admits])..........Gives me the total of both years in REPORT FOOTER.....
What will give me the total of 2004 admits ONLY in the report footer???? I
have tried every expression!!!!! Please someone help!
 
THANK YOU VERY VERY MUCH!!!!! What does "Abs" do????

Duane Hookom said:
Set your control source to:
=Sum(Abs([Year]=2004) * [Hospital Admits])

--
Duane Hookom
MS Access MVP
--

BUCKPEACE said:
lets say I have 2 fields 1. year (2004 or 2005) and 2. hospital
admits......In the report, I can add those together in the report
footer.....HOWEVER, what if I wanted to add JUST 1 year instead of
both????
(i.e total 2004 sum of the admits)
=sum([admits])..........Gives me the total of both years in REPORT
FOOTER.....
What will give me the total of 2004 admits ONLY in the report footer????
I
have tried every expression!!!!! Please someone help!
 
Abs() finds the absolute value of a numeric expression. [Year] = 2004 will
evaluate to either True/-1 or False/0.

--
Duane Hookom
MS Access MVP
--

BUCKPEACE said:
THANK YOU VERY VERY MUCH!!!!! What does "Abs" do????

Duane Hookom said:
Set your control source to:
=Sum(Abs([Year]=2004) * [Hospital Admits])

--
Duane Hookom
MS Access MVP
--

BUCKPEACE said:
lets say I have 2 fields 1. year (2004 or 2005) and 2. hospital
admits......In the report, I can add those together in the report
footer.....HOWEVER, what if I wanted to add JUST 1 year instead of
both????
(i.e total 2004 sum of the admits)
=sum([admits])..........Gives me the total of both years in REPORT
FOOTER.....
What will give me the total of 2004 admits ONLY in the report
footer????
I
have tried every expression!!!!! Please someone help!
 
Back
Top