Re: Additional inform to prev post - "Report Formula"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Marshall
Thank you very much for your help. I redid the formula per your suggestion
and it worked beautifully. Again thank you very much for your help.

Aurora

"Marshall Barton" wrote:

Formula in Report wrote:

I am using Access 2003
I just noticed that I add up items [Prod A] through [Prod C] into a 2nd
field called [Prod Total]. then I have a [freight] field and then a [return
credit] field. My [total cost] field actually adds [prod total]+
[freight]-[return credit]. As I looked at the all of the data in the
database, I noticed that my total cost only showed up when there was an
actual [return credit] involved. My return credit field has a $0.00 if
there are no credits involved. Does anyone have any idea as to what is
happening or how to correct this issue???


Generally, when a value is not specified, it contains Null.
Null is a funny value because it represents something that
means Unknown. In an expression, e.g. [Prod A] + Unknown,
the total will be Unknown and display as nothing. I hope
you can make some sense of that, because it it a very
important concept that comes up a lot.

The Nz function is provided to help deal with this kind of
thing. Nz([Prod A], 0) will return 0 when [Prod A] is Null.

Putting all that together, your [Prod Total] text box
expression should be more like:
=Nz([Prod A],0) + Nz([Prod B],0) + Nz([Prod C],0)
and something similar for the total code text box.

--
Marsh
MVP [MS Access]

.



Relevant Pages

  • =?ISO-8859-1?Q?Re:_Ida_de_Tony,_mother_of_William_Longesp=E9e,_Earl_?= =?ISO-8859-1?
    ... To remove this from the current topic to the more general, Jette is ... where does true priority lie? ... to publish the suggestion? ... How about 'credit' which is distinct from ...
    (soc.genealogy.medieval)
  • Re: need sumproduct
    ... Still unknown, thanks for your suggestion T.Valko, ... this is still a mystery for me where to find a single ... T. Valko Wrote: ...
    (microsoft.public.excel.misc)
  • Re: need sumproduct
    ... Format column C as NUMBER set to 15 decimal places: ... Still unknown, thanks for your suggestion T.Valko, ... Hope anyone else can give a single sumproduct formula or other evolved ...
    (microsoft.public.excel.misc)
  • Re: Whos going to be at CMW in Santa Barbara?
    ... -someone on this forum, and onewheeljoe. ... (unknown person, please PM me ... so you can get credit for this great quote.) ...
    (rec.sport.unicycling)
  • Re: ANY REPAIR GUIDES FOR NI WUMPF SYSTEM 1 CPUS?
    ... fire LOL Well theres a smoked trace.... ... The other unknown what was ... it's toast,they'll give you a credit toward a new replacement. ...
    (rec.games.pinball)