Re: Additional inform to prev post - "Report Formula"
- From: Formula in Report <FormulainReport@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 9 Feb 2009 06:21:04 -0800
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]
- References:
- Additional inform to prev post - "Report Formula"
- From: Formula in Report
- Re: Additional inform to prev post - "Report Formula"
- From: Marshall Barton
- Additional inform to prev post - "Report Formula"
- Prev by Date: Report Questions
- Next by Date: RE: Retrieving a specific record from a query
- Previous by thread: Re: Additional inform to prev post - "Report Formula"
- Next by thread: RE: Report formula
- Index(es):
Relevant Pages
|