Help adding in a Form

rkrause

Registered User.
Local time
Today, 00:08
Joined
Sep 7, 2007
Messages
343
Im using access 2007. I have a form that has a total text box. In this total text box, my user is going to be putting in the total amount from an invoice. After thats put in the textbox i have 12 other boxes that will also get numbers entered into. Once all those boxes have numbers in them, the last box is called general repair, this box will have all the left over dollars that are not allocated into the 12 other boxes.

The formula im trying to use is General Repair = Invoice total - Sum(all the 12 boxes)

This seems fairy straight forward but i can not get it to work. I am using an onfocus event on the general repair txt box.
Thanks for any help
 
You will need to use;

General Repair = Invoice total - (Box1 + Box2 + ....... + Box12)
 
Thats what im using, but do i put that in the code builder, or the expression builder?

Do i need SUM in there at all or any brackets?
 
Sorry, I didn't realise you were using Sum to abbreviate your formula.

I would put the formula in the Control Source of the General Repair field. The Control Source would actually be along the lines of;

= [Invoice total] - ([Box1] + [Box2] + ....... + [Box12])

The square brackets are needed but Sum isn't

Or do you want to be able to amend this field as well?
 
Exactly what i was looking for, it works. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom