Re: Coditional formatting
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Wed, 11 May 2005 19:37:54 -0500
Russ Kroeger wrote:
>It was actually the first two suggestions that got it to work also I moved
>the Null to the end of the expression and that did the trick. Now if I may
>ask another question.
>Now that I have the report working I am trying to get it to give me a total
>of all the reported values. When I create a text box and use the expression
>=sum([txtcarrchg]) the report produces a dialog box that asks for a
>parameter. If I enter 0 I get ths sum 0 on the report if I enter 2 it will
>report 2 times the number of records etc. Is it possible to get a sum of
>the values when using a conditional expression or am I trying to do
>something that is not possible.
The aggregate functions are not aware of controls on a
form/report, they only operate on fields in the record
source table/query. You can use them on an expression as as
long as all the terms are record source fields. Also note
that they ignore Null values.
Therefore, your problem is simply solved by using the
expression:
=Sum(IIf(IsNull([P/UCarrPdChk]), [P/UCarrChk], Null))
or
=Sum(SameExpressionAsTheTextbox)
--
Marsh
MVP [MS Access]
.
- Follow-Ups:
- Re: Coditional formatting
- From: Russ Kroeger
- Re: Coditional formatting
- References:
- Coditional formatting
- From: Russ Kroeger
- Re: Coditional formatting
- From: Marshall Barton
- Re: Coditional formatting
- From: Russ Kroeger
- Re: Coditional formatting
- From: Marshall Barton
- Re: Coditional formatting
- From: Russ Kroeger
- Coditional formatting
- Prev by Date: Re: Results double when printing
- Next by Date: Re: Printing "Upside down"
- Previous by thread: Re: Coditional formatting
- Next by thread: Re: Coditional formatting
- Index(es):
Relevant Pages
|