Calculated Value

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

Guest

I have a report which has a Sum1 and a Sum2 in a group footer. Sum1 and Sum2
are additions of values of 2 different fields. Now I want another box in the
same group footer which would have the value Sum1/Sum2. I attempted to create
an unbound text box control from the toolbox and set its control source
property to this division but I am unable to. Please advise.
 
What are the names of these text boxes that show the totals?

If they are called Text272 and Text273, you should be able to set the
ControlSource property of another text box to:
=[Text272] / [Text273]

That will now nothing at all if either Text272 or Text273 is blank.
It will show #Error if Text273 contains zero (because you can't divide by
zero). To avoid that, use:
=IIF([Text273] = 0, 0, [Text272] / [Text273])

It may help to set the Format property of all 3 text boxes to:
General Number
so Access understands the kind of data in the calculated controls.
 
Back
Top