A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multiple



 
 
Thread Tools Display Modes
  #1  
Old May 28th, 2010, 04:52 AM posted to microsoft.public.access.reports
Chris75 via AccessMonster.com
external usenet poster
 
Posts: 32
Default Multiple

Hello,

Within a report, I have a textbox called Absence. This textbox gives me a
list of five possible absences (present, sick, vacation, training and stat
holiday). Within this report, I am able to get the total of each absence for
a period of time. However, I would like to divide only two of these
individual totals by five (present and vacation). Present has an AbsenceID
value of 1 and Vacation has an AbsenceID value of 3.

Right now, to get the totals, I have a text box called Count *. This gives
the total count for each absence in the period I have selected. I also have
a textbox called DayTotal. It is here where I would like to show the divided
figures for AbsenceID 1 and AbsenceID 3 only.

In the DayTotal textbox of the report, I wrote the following in the Data
Control Source : =Sum([AbsenceID]=1)/5. This works, however I would also
like to show the same thing for AbsenceID 3 in the same report, such that
when I view the report, I will see the totals for all five categories, but I
will only see the DayTotal for two of the five categories.

Any ideas?

Thank you

--
Message posted via http://www.accessmonster.com

  #2  
Old May 28th, 2010, 05:03 PM posted to microsoft.public.access.reports
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Multiple

I am not sure I follow correctly but try this --
=Sum(IIF([AbsenceID]=1 OR [AbsenceID]=3, .2, 0))

--
Build a little, test a little.


"Chris75 via AccessMonster.com" wrote:

Hello,

Within a report, I have a textbox called Absence. This textbox gives me a
list of five possible absences (present, sick, vacation, training and stat
holiday). Within this report, I am able to get the total of each absence for
a period of time. However, I would like to divide only two of these
individual totals by five (present and vacation). Present has an AbsenceID
value of 1 and Vacation has an AbsenceID value of 3.

Right now, to get the totals, I have a text box called Count *. This gives
the total count for each absence in the period I have selected. I also have
a textbox called DayTotal. It is here where I would like to show the divided
figures for AbsenceID 1 and AbsenceID 3 only.

In the DayTotal textbox of the report, I wrote the following in the Data
Control Source : =Sum([AbsenceID]=1)/5. This works, however I would also
like to show the same thing for AbsenceID 3 in the same report, such that
when I view the report, I will see the totals for all five categories, but I
will only see the DayTotal for two of the five categories.

Any ideas?

Thank you

--
Message posted via http://www.accessmonster.com

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.