Subtraction in reports

moleary

Senior Member
Local time
Today, 21:42
Joined
Feb 9, 2001
Messages
58
How can I do subtraction in my report, I have two columns one for requested hours and another for approved hours and I have totaled these columns now I would like to see the difference in hours?
 
try thhis
=[requestedhours]-[approvedhours] on a text box
 
I did that and it gave me #error, I put a text box and with the expression builder I put approved hours-requested hours?
 
Check the control name of the textbox. It cannot be the same as the name of one of the columns used in the form's recordsource. When you use a wizard to build a form, it usually names the controls with the same name as the recordsource column that is bound to them. If you changed one of these wizard built controls to do the calculation, you'll need to change the control name.

Normally having the control name the same as the recordsource column name it is bound to is not a problem. However, if you do any calculations, Access has no way of knowing whether you are refering to the control or the recordsource column and that generates the #error.
 

Users who are viewing this thread

Back
Top Bottom