Sum of Two fields (1 Viewer)

aliasquark

Registered User.
Local time
Today, 04:51
Joined
Dec 2, 2002
Messages
14
Sum of Two fields **RESOLVED**

I am trying to sum two fields in a record.

Using the sum function I have only been able to add all the values within the field in question.

Field1__Field2__FieldSum1__FieldSum2
1______0_______14______ 0
0______1_______14______ 0
10_____3_______14______ 0
3______-2_______14______ 0



Need something along the lines of:

Select ( [Field1] + [Field2] ) As FieldSum

I.e.

Field1_Field2__FieldSum
1______0______1
0______1______0
10_____3______13
3______-2______1
 
Last edited:
R

Rich

Guest
You've answered your own question in the second example,
either add an unbound text box to a form/report and set the control source to =[Field1]+[field2] or add FieldSum:[Field1]+[field2] to the query grid
 

aliasquark

Registered User.
Local time
Today, 04:51
Joined
Dec 2, 2002
Messages
14
Doesn't like me doing that!

Does it matter that Field 1 And Field 2 exist in two different tables (linked by a id field).

I am using the query grid in access but I don't know what to put down in the table drop down menu.... Should it be blank, or the name of the query that I am working in?

Thanks
Q.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:51
Joined
Feb 19, 2002
Messages
43,466
In the Field cell, put an expression in the format:

OutputFieldName :Nz( YourField1 ,0) + Nz( YourField2 ,0)


Don't put anything in any of the other cells.[
 

Users who are viewing this thread

Top Bottom