Re: Using If/When type expressions in a report
From: John Spencer (MVP) (spencer4_at_comcast.net)
Date: 04/30/04
- Next message: gene: "Help!! Problem with query"
- Previous message: tina: "Re: Test for no records returned"
- In reply to: Saskatoon: "Using If/When type expressions in a report"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 21:32:10 -0400
= Sum(IIF(Manager = -1, .7,1)*[Units])
Saskatoon wrote:
>
> 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: gene: "Help!! Problem with query"
- Previous message: tina: "Re: Test for no records returned"
- In reply to: Saskatoon: "Using If/When type expressions in a report"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|