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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having a difficult time coming up with a formula for a query to them u

Status
Not open for further replies.

dw1

IS-IT--Management
Oct 2, 2002
47
0
0
US
I am trying to find out the totals of two Fields [EDIT] and [SAVE] the only ecpression I could write was sum([edit]and[save]) any help in writing the exprestion in query view or SQL would be apricated.
 
Hi
Do you mean total as in "sum all records for field save and field edit" or "add field edit to field save"?
If it is the first option, the Access query builder produced this for me:
[tt]SELECT Statistics.Month, Sum(Statistics.SentTo) AS ST, Sum(Statistics.NotSentTo) AS NST, Sum(Statistics.NotHeld) AS NH, Sum(Statistics.ReceivedFrom) AS RF, Sum(Statistics.NotRecFrom) AS NRF
FROM Statistics
GROUP BY Statistics.Month;[tt]

I hope I have not completely misunderstood.
 
Sorry for the lack of clarity.

I would like to see a sum of SAVE+EDIT for each record not for the Field totals.
 
As in ... (?)
SELECT Nz([Edit])+ Nz([Save]) AS Tot
FROM SomeTable;
 
Formula Results:

Record Edit value=138 Save value=18 FurmulaResults in 13818 not the sum (156)
 
Hi
Then I think these fields must be text. You could try using Val:
SELECT Nz(Val([Edit]))+ Nz(Val([Save])) AS Tot
FROM SomeTable;
 
thats the ticket thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top