Sum of calculated and uncalculated fields

  • Thread starter Lori2836 via AccessMonster.com
  • Start date
L

Lori2836 via AccessMonster.com

Hopefully someone can help. I have 2 columns in a form. One column, HRS/M,
has fields of Hrs/M1, Hrs/M2, Hrs/M3 (which are hours manually entered).

The second column,Unit Cost, has calculated fields of (Hrs/M1*94.45),
(Hrs/M2*94.45), etc. (FYI - $94.45 is the Unit Cost)

Then, because there will be cost not associated with hours or a unit cost
(such as purchased parts) ...it needs to be entered manually. These cells
are uncalculated and named (Unit Cost1), (Unit Cost2), etc.

I want to sum (Hrs/M1*94.45) and (Hrs/M2*94.45) and (Unit Cost1) and (Unit
Cost2), etc.
Is there a way to sum both calculated and uncalculated cells for a total at
the bottom of the column?

Thanks!
 
J

Jeff L

Your sum fields would look like this:
=Nz([Field1],0) + Nz([Field2],0) + Nz([Field3],0) + ....

Hope that helps!
 
L

Lori2836 via AccessMonster.com

Thanks Jeff. Actually, I tried that, and it only gave me the total of the
uncalculated fields.
= Nz([Hrs/M1],0)*94.45 + ([Hrs/M2],0)*94.45 + ([Hrs/M3],0)*94.45 + Nz[Unit
Cost1] + Nz[Unit Cost2]))

Am I doing something wrong?

Jeff said:
Your sum fields would look like this:
=Nz([Field1],0) + Nz([Field2],0) + Nz([Field3],0) + ....

Hope that helps!
Hopefully someone can help. I have 2 columns in a form. One column, HRS/M,
has fields of Hrs/M1, Hrs/M2, Hrs/M3 (which are hours manually entered).
[quoted text clipped - 16 lines]
 
J

Jeff L

I am missing something here. You said that Unit Cost was the result of
[Hrs/M1]*94.45 or
[Hrs/M2]*94.45 etc. Then you say that Unit Cost fields are
uncalculated. I'm confused. You should use the fields that you have
your [Hrs/M1]*94.45 calculated in in the sum field. So if UnitCost1 =
[Hrs/M1]*94.45 and UnitCost2 = [Hrs/M2]*94.45, your sum would be
=Nz(UnitCost1,0) + NZ(UnitCost2,0)

Thanks Jeff. Actually, I tried that, and it only gave me the total of the
uncalculated fields.
= Nz([Hrs/M1],0)*94.45 + ([Hrs/M2],0)*94.45 + ([Hrs/M3],0)*94.45 + Nz[Unit
Cost1] + Nz[Unit Cost2]))

Am I doing something wrong?

Jeff said:
Your sum fields would look like this:
=Nz([Field1],0) + Nz([Field2],0) + Nz([Field3],0) + ....

Hope that helps!
Hopefully someone can help. I have 2 columns in a form. One column, HRS/M,
has fields of Hrs/M1, Hrs/M2, Hrs/M3 (which are hours manually entered).
[quoted text clipped - 16 lines]
 
L

Lori2836 via AccessMonster.com

Jeff - I have calculated cells and uncalculated cells that need to go into
the total. The calculated are [Hrs/M1]*94.45+[Hrs/M2]*94.45........the
uncalculated cells (where a dollar amount will be entered manually) are the
[Unit Cost1] and [Unit Cost2]. (Therefore, 4 cells need to be totalled) I
have tried using the expression

=[Hrs/M1]*94.45+[Hrs/M2]*94.45 + [Unit Cost1]+[Unit Cost2]

but that doesn't seem to work.


Jeff said:
I am missing something here. You said that Unit Cost was the result of
[Hrs/M1]*94.45 or
[Hrs/M2]*94.45 etc. Then you say that Unit Cost fields are
uncalculated. I'm confused. You should use the fields that you have
your [Hrs/M1]*94.45 calculated in in the sum field. So if UnitCost1 =
[Hrs/M1]*94.45 and UnitCost2 = [Hrs/M2]*94.45, your sum would be
=Nz(UnitCost1,0) + NZ(UnitCost2,0)
Thanks Jeff. Actually, I tried that, and it only gave me the total of the
uncalculated fields.
[quoted text clipped - 17 lines]
 
J

Jeff L

Your expression will only work if all four fields have vaules. That's
why you need
Nz(FieldName,0). I have tested this and it works fine.
=Nz([Hrs/HM1],0)*94.5+Nz([Hrs/HM2],0)*94.5+Nz([UnitCost1],0)+Nz([UnitCost2],0)


Jeff - I have calculated cells and uncalculated cells that need to go into
the total. The calculated are [Hrs/M1]*94.45+[Hrs/M2]*94.45........the
uncalculated cells (where a dollar amount will be entered manually) are the
[Unit Cost1] and [Unit Cost2]. (Therefore, 4 cells need to be totalled) I
have tried using the expression

=[Hrs/M1]*94.45+[Hrs/M2]*94.45 + [Unit Cost1]+[Unit Cost2]

but that doesn't seem to work.


Jeff said:
I am missing something here. You said that Unit Cost was the result of
[Hrs/M1]*94.45 or
[Hrs/M2]*94.45 etc. Then you say that Unit Cost fields are
uncalculated. I'm confused. You should use the fields that you have
your [Hrs/M1]*94.45 calculated in in the sum field. So if UnitCost1 =
[Hrs/M1]*94.45 and UnitCost2 = [Hrs/M2]*94.45, your sum would be
=Nz(UnitCost1,0) + NZ(UnitCost2,0)
Thanks Jeff. Actually, I tried that, and it only gave me the total of the
uncalculated fields.
[quoted text clipped - 17 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top