A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum of calculated and uncalculated fields



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2006, 07:15 PM posted to microsoft.public.access.forms
Lori2836 via AccessMonster.com
external usenet poster
 
Posts: 44
Default Sum of calculated and uncalculated fields

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!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1

  #2  
Old November 8th, 2006, 08:02 PM posted to microsoft.public.access.forms
Jeff L
external usenet poster
 
Posts: 448
Default Sum of calculated and uncalculated fields

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

Hope that helps!

Lori2836 via AccessMonster.com wrote:
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!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


  #3  
Old November 8th, 2006, 08:21 PM posted to microsoft.public.access.forms
Lori2836 via AccessMonster.com
external usenet poster
 
Posts: 44
Default Sum of calculated and uncalculated fields

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 L wrote:
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]
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1

  #4  
Old November 8th, 2006, 10:01 PM posted to microsoft.public.access.forms
Jeff L
external usenet poster
 
Posts: 448
Default Sum of calculated and uncalculated fields

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)


Lori2836 via AccessMonster.com wrote:
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 L wrote:
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]
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


  #5  
Old November 9th, 2006, 01:55 PM posted to microsoft.public.access.forms
Lori2836 via AccessMonster.com
external usenet poster
 
Posts: 44
Default Sum of calculated and uncalculated fields

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 L wrote:
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]
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1

  #6  
Old November 9th, 2006, 06:56 PM posted to microsoft.public.access.forms
Jeff L
external usenet poster
 
Posts: 448
Default Sum of calculated and uncalculated fields

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)



Lori2836 via AccessMonster.com wrote:
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 L wrote:
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]
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200611/1


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.