If's

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

Is it possible to use a similar command as the one below,
but to create more than 2 out comes.

=IIf(([Card Order Quantity]<51),"£1","£2")

I need to have about 5 out comes, depending on how many
cards are ordered.

(ie. 0-50 cards = £1 ... 51-100 Cards = £2 ... 101-500
Cards = £3 and so on.)
Reagrds - Gary
 
Try replacing the false part of the IIf (in your example
"£2") with another IIf statement and so on.

Hope That Helps
Gerald Stanley MCSD
 
You can add multiple nested IIf() statements:

IIf([Card Order Quantity]<61),"£3", IIf(([Card Order
Quantity]<51),"£1","£2"))

But it's far easier to do it in code with a Select Case statement:

Select Case Me.[Card Order Quantity]

Case <51
Me.ControlName = £1

Case <61
Me.ControlName = £2

Case <71
Me.ControlName = £3

Case Else

End Select
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Is it possible to use a similar command as the one below,
but to create more than 2 out comes.

=IIf(([Card Order Quantity]<51),"£1","£2")

I need to have about 5 out comes, depending on how many
cards are ordered.

(ie. 0-50 cards = £1 ... 51-100 Cards = £2 ... 101-500
Cards = £3 and so on.)
Reagrds - Gary
 
Thanks for that - I understand the 1st way, but not sure
where to insert the 2nd way that you stated.

BUT, is it possible to do a similar thing with a new
table, so that if prices change I can make a new form to
up date them, rather than digging into the programming
side?

Many thanks - Gary
 
Back
Top