Add totals in two fields

Dave Titan

Registered User.
Local time
Today, 22:19
Joined
Jan 1, 2002
Messages
69
I think this should be easy.......

I've two fields with multible records.

In each field a number is put in.

I'd like a third field to add these numbers for a total.

Can someone lay this out in laymans?

Thanks
 
Hi

It's good practice not to have totals of 2 fields in tables, this is because the values may change and the total won't and its also a waste of space.

The solution is to do the totals in a query, report or form so that the total is recalculated fresh each time. Whichever way you choose, the syntax is the same.

[Field1] +[Field2]


Hope this helps

Col
 
Thanks, However whenever I try this in a Form using an Expression the two fields [Males 8-11] + [Males 12-15] just place the numbers side by side like:

Males 8-11 = 5
Males 12-15= 5
Total Males = 55

It does not add them up together??
 
Hi

I just tried this on a form just to make sure and it works fine

=[Field1] + [Field2]

enter the above in the control source of an unbound textBox

Col
 
Right, strange thing afoot.

I tried that again, and it didn't work. But I then made a new DB, and it did?!!

I don't understand why it would work in one but not another??

Ok yes I do. Two fields were in memo not number........

Listen thanks for the help I'll be able to add a few things up now

Cheers
 
Last edited:
Everything seems to be working. But any ideas how to get two totals (made by unbound text boxes) into an other totals box.

so I've two added up boxes "male" + "female". I'd like to add them together but because they're text boxes it doesn't seem to work???????

Just figured it, change the label caption!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom