If...Then Statement

  • Thread starter Form Maker via AccessMonster.com
  • Start date
F

Form Maker via AccessMonster.com

I am an Access beginner attempting to create an expression:

I want the field "Cleaning Fee" to return the amount $150.00 only if another field "Length of Stay" is less than 7. This is what I have so far and it is not working...

=IIf ( [Length of Stay] is < "7", then "$150.00" else "$0.00"

I've tried a dozen different things and nothing seems to work. PLease help.
By the way, if it makes a difference, the field "length of stay" is a date difference value: =DateDiff("d",[Arrival Date],[Depature Date])
 
K

Ken Snell [MVP]

=IIf ( [Length of Stay] < 7,150,0)

--

Ken Snell
<MS ACCESS MVP>

Form Maker via AccessMonster.com said:
I am an Access beginner attempting to create an expression:

I want the field "Cleaning Fee" to return the amount $150.00 only if
another field "Length of Stay" is less than 7. This is what I have so far
and it is not working...
=IIf ( [Length of Stay] is < "7", then "$150.00" else "$0.00"

I've tried a dozen different things and nothing seems to work. PLease help.
By the way, if it makes a difference, the field "length of stay" is a date
difference value: =DateDiff("d",[Arrival Date],[Depature Date])
 

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

Similar Threads


Top