access formula

  • Thread starter Thread starter eddie1092
  • Start date Start date
E

eddie1092

I need to translate this formula into access =SUMIF(C2:C42223,C2,P2:P42223) I
try without luck I go back to excel
 
So you want the sum of a specific field where the value of some other field
is equal to a known value, correct?

You can use DSum:

DSum("SomeField", "SomeTable", "SomeOtherField = Value")
 
In excel you work with ranges A1:A10, etc in access you work with records.
You need to somehow tell the application "what" records (and which field
within the record you want to sum

SomeName:Sum(IIf([TableName]![FieldName] =Something??,Sum(Something here)))

Change the "somethings" to whatever you want

Good luck
 
Yes but my something value is the same as the fieldname.

The table is a Tenure filed and I need to count cumulative If I have tneure
9 months 200 hundred records the result should be 1 to 200 in order then
tenure 10months are 100 records the result should be 1 to 100 (1,2,3,4,etc.
to 100)

Something like this I think
Sum(IIf([TableName]![FieldName] =([TableName]![FieldName],
Sum(([TableName]![FieldName])))

But it doesn't count by tenure

Wayne-I-M said:
In excel you work with ranges A1:A10, etc in access you work with records.
You need to somehow tell the application "what" records (and which field
within the record you want to sum

SomeName:Sum(IIf([TableName]![FieldName] =Something??,Sum(Something here)))

Change the "somethings" to whatever you want

Good luck

--
Wayne
Manchester, England.



eddie1092 said:
I need to translate this formula into access =SUMIF(C2:C42223,C2,P2:P42223) I
try without luck I go back to excel
 
Back
Top