If...Then Statement

  • Thread starter Thread starter Form Maker via AccessMonster.com
  • Start date 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])
 
=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])
 
Back
Top