Re: Help with expression builder and IF Statements
From: Gerald Stanley (gcstanley_at_d-s-l.pipex.com)
Date: 04/20/04
- Next message: Mike Fellows: "Re: Help with expression builder and IF Statements"
- Previous message: Mike Fellows: "Help with expression builder and IF Statements"
- In reply to: Mike Fellows: "Help with expression builder and IF Statements"
- Next in thread: Mike Fellows: "Re: Help with expression builder and IF Statements"
- Reply: Mike Fellows: "Re: Help with expression builder and IF Statements"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Apr 2004 03:40:51 -0700
Put your query into Design Mode thne put the following in
the nest available field column
IIf(ColumnX < 1000,ColumnX * 0.3, IIf(ColumnX < 2000,
ColumnX * 0.4, ColumnX * 0.5))
Hope This Helps
Gerald Stanley MCSD
>-----Original Message-----
>Im not really a big user of MS Access so please bear with me
>
>I have a field which contains a numerical value (ColumnX)
>
>In a new column in the query i need to take the value of
ColumnX and if the
>value is less than 1000
>i need to put 30% of ColumnX into the new column
>if its greater than 1000 and less than 2000
>i need to put 40% of ColumnX into the new column
>anc finally if its greater than 2000
>i need to put 50% of ColumnX into the new column
>
>i.e.
>
>if columnX <=1000 then
> newColumn = ColumnX*0.3
>else if ColumnX >1000 and <= 2000 then
> newColumn = ColumnX*0.4
>else if ColumnX >2000 then
> newColumn = ColumnX*0.5
>endif
>
>I have no idea how to do the above in a query, Ive looked
about on the web
>and I am unable to find anything to do with If statements
>for Querys if anyone could help with this it would be
greatly appreciated
>
>Mike Fellows
>
>
>.
>
- Next message: Mike Fellows: "Re: Help with expression builder and IF Statements"
- Previous message: Mike Fellows: "Help with expression builder and IF Statements"
- In reply to: Mike Fellows: "Help with expression builder and IF Statements"
- Next in thread: Mike Fellows: "Re: Help with expression builder and IF Statements"
- Reply: Mike Fellows: "Re: Help with expression builder and IF Statements"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|