Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

summing

Status
Not open for further replies.

rccline

Technical User
Jun 13, 2002
341
US
I'd like to create a query that sums two fields.

Field1 + Field2 = Expr1

Thanks.

Robert
 
What have you tried? Please post your SQL.
 
I seached online for an hour... scanned through my Access books... I've come up with nothing.
 
In the field cell of the query grid:
Expr1: Field1 + Field2

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
The result is nothing. Blank rows.

If I try to associate the sum with an ID such as RowID, I am advised that this is an aggregate function. Help only explains what an aggreage function is, is doesn't provide a solution.

I try expr1: Sum([field1]+[field2])



Select [field1] As A,[field2] As B
From mytable
Sum(A+B);

The only solution I can see is to create a bridge table,
RowID Field1 Field2

Export to Excel. Perform the addition, import the bridge back into Access.

I'd like to believe there is a way to do this without going to Excel.


 

And in the GUI (Grid) view:

Field Table
Field1 TableName
Field2 TableName
Total:Field1 + Field2 leave blank


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top