Summing Text Box

  • Thread starter Thread starter jana
  • Start date Start date
J

jana

I have made a report that has a calculated text box based
on an if..then..else statement.
Sample
If workdays = 1 then
FTE= stafftotal *1
elseif workdays = 2 then
FTE=stafftotal *1.25
else:stafftotal=0
endif


I have the formula working correctly, but I would like to
sum that value at the end of the report. I was assuming
that I could just sum the value of the FTE box but that is
coming up with an error.

Any help would be greatly appreciated.

Jana
 
I'm guessing that the textbox showing this is in the Detail section and you
want to show the sum in a Footer section. I'm also assuming the Workdays and
StaffTotal are fields in the report. Place another textbox in the detail
section and set its Visible property to No. In its Control Source type

=IIf([Workdays]=1, [StaffTotal], IIf([Workdays]=2, [StaffTotal]*1.25, 0))

Below the Control Source set the Running Sum to Over All.

In the footer, place a textbox and set its ControlSource to point to this
textbox.

=txtSummingTextbox
 
Thank you for your assistance. I only gave you part of
the equation, but your advice helped me work through the
formula and it works great!

Once again, thanks.

-----Original Message-----
I'm guessing that the textbox showing this is in the Detail section and you
want to show the sum in a Footer section. I'm also assuming the Workdays and
StaffTotal are fields in the report. Place another textbox in the detail
section and set its Visible property to No. In its Control Source type

=IIf([Workdays]=1, [StaffTotal], IIf([Workdays]=2, [StaffTotal]*1.25, 0))

Below the Control Source set the Running Sum to Over All.

In the footer, place a textbox and set its ControlSource to point to this
textbox.

=txtSummingTextbox

--
Wayne Morgan
Microsoft Access MVP


I have made a report that has a calculated text box based
on an if..then..else statement.
Sample
If workdays = 1 then
FTE= stafftotal *1
elseif workdays = 2 then
FTE=stafftotal *1.25
else:stafftotal=0
endif


I have the formula working correctly, but I would like to
sum that value at the end of the report. I was assuming
that I could just sum the value of the FTE box but that is
coming up with an error.

Any help would be greatly appreciated.

Jana


.
 
Back
Top