Using If/When type expressions in a report
From: Saskatoon (anonymous_at_discussions.microsoft.com)
Date: 04/29/04
- Next message: Van T. Dinh: "Re: Update Query Follow-up"
- Previous message: Alan Nicoll: "Data from previous record"
- In reply to: Linda Wampach: "Using If/When type expressions in a report"
- Next in thread: John Spencer (MVP): "Re: Using If/When type expressions in a report"
- Reply: John Spencer (MVP): "Re: Using If/When type expressions in a report"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 16:08:05 -0700
Use an unbound text box
Set the control source to
=IIF([manager]=-1,[TOTALUNITS]*.7,SUM([UNITS]))
Make sure you use the names for your fields that appear on
the Name line of your text boxes, otherwise you will get
error messages.
For some reason Access uses -1 to mean yes and 0 to mean No
Hope this helps
>-----Original Message-----
>I want to create a field within a report based upon
>whether another field is true or false. Not only that,
>but I want to be able to calculate that field. For
>instance:
>
>Typically, the TOTALUNITS field would be calculated by
>using a =Sum[Units]expression. I want to be able to
>multiply the TOTALUNITS by .7 if another field (yes/no
>field) called MANAGER is = yes. Otherwise, I want to
just
>sum the field.
>
>I need to do this in the report.
>
>Any ideas?
>.
>
- Next message: Van T. Dinh: "Re: Update Query Follow-up"
- Previous message: Alan Nicoll: "Data from previous record"
- In reply to: Linda Wampach: "Using If/When type expressions in a report"
- Next in thread: John Spencer (MVP): "Re: Using If/When type expressions in a report"
- Reply: John Spencer (MVP): "Re: Using If/When type expressions in a report"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|