iif statement

W

why_me143

hey
im creating a hotel booking system on microsoft access and i would like to
use an IIf statement on my report to work out a discounted cost for recurring
customers
so far i have manage to create a iif statement but that shows the formula
instead of the value
i have two unbound text boxes and have put:

=IIf([Promotions?]=True," «Expr» [Text56] «Expr» "," «Expr» [Text54] «Expr»
")

Text56 is =[text41]*0.9
Text 54 is =[text41]
with text 41 being the total cost


can anyone help ?
 
H

H. Druss

why_me143 said:
hey
im creating a hotel booking system on microsoft access and i would like to
use an IIf statement on my report to work out a discounted cost for
recurring
customers
so far i have manage to create a iif statement but that shows the formula
instead of the value
i have two unbound text boxes and have put:

=IIf([Promotions?]=True," «Expr» [Text56] «Expr» "," «Expr» [Text54]
«Expr»
")

Text56 is =[text41]*0.9
Text 54 is =[text41]
with text 41 being the total cost


can anyone help ?
Hi
should be:

Result = Iff(Expression,True Part, False Part)

Good luck
Harold
 
B

BruceM

It looks as if you used the (wretched) expression builder. «Expr» is a
placeholder. It cannot be part of the expression. You may need to use the
expressions directly rather than referencing Text56 and Text54:
=IIf([Promotions?]=True,[Text41]*0.9,[Text41])

If Text41 is a calculated control you may need to substitute the expression
for the text box name.
Consider giving text boxes, etc. useful names rather than the default names.
For instance, txtTotal instead of Test41.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top