add bound fields for sum in unbound field

  • Thread starter kathrynwoning via AccessMonster.com
  • Start date
K

kathrynwoning via AccessMonster.com

I have 4 bound fields that I would like to add together to arrive at an
overall total. The calculated total needs to appear on a report, but not in
the table.

Before adding these fields the control source for bidCalcTotal looked like
this and worked perfectly:
=Nz([bidTotal])-Nz([altRoomCostSubTs])

Currently this is the code on the Control Source for bidCalcTotal

=[bidTotal]+Nz([altRoomCostSubTs])+[bidDeliver]+[bidInstall]

The original code worked on this before I added two fields to the form's
control source: bidDeliver and bidInstall. The moment they were added to the
qry the bidCalcTotal field messed up. Why is that?
 
K

Klatuu

Assuming [bidDeliver] and [bidInstall] are both record source field names and
not control names, it should be correct, with one exception. You may need to
use the Nz function on those fields if there is any possibility they could
have rows with null values in those fields.
 
K

kathrynwoning via AccessMonster.com

this doesn't work:

=Nz([tblBids]![bidTotal])+Nz([tblBids]![bidDeliver])+Nz([tblBids]![bidInstall]
)+Nz([altRoomCostSubTs])
 
K

Klatuu

It should. I have only done this a few hundred times, so what do I know?

The original code worked on this before I added two fields to the form's
control source: bidDeliver and bidInstall. The moment they were added to the
qry the bidCalcTotal field messed up. Why is that?

where you say control source, hopefully you mean recordsource.

Are you getting an error? If not, what results are you getting?
 
K

Klatuu

What says #Name?
Where ever it is, it means it can't find the object you are referring to.
If It were me, I would check to ensure the new fields are actually in the
record source, then I would check the syntax of my calculation and be sure
the calculation is referring to record source field names and not control
names.

Please post back if you need more help.
 
K

kathrynwoning via AccessMonster.com

I will check all this diligently in case I have missed something on Monday.
Thank you for all your guidance!
 

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