About
Pricing
Community
Teams
Start Free Trial
Log in
ocdc
asked on
3/19/2012
IFF expression
Why is only the first part working on this? This only subtracts 5% from all prices.
Iff([DatePosted]>3/4/2012,
[Price]-.0
5*[Price],
[Price]-.0
3*[Price])
I appreciate your help.
Microsoft Access
6
1
Last Comment
Dale Fye
8/22/2022 - Mon
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
3/19/2012
Try this ... with #'s wrapping the date:
Iff([DatePosted] > #3/4 /2012#, [Price] - 0.05 * [Price], [Price] - 0.03 * [Price])
mx
ocdc
3/19/2012
ASKER
the #'s prompt me for a date. [DatePosted] is the date, so I should not be getting a prompt.
ASKER CERTIFIED SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
3/19/2012
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ocdc
3/19/2012
ASKER
It worked great. Thanks.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
3/19/2012
which one ?
Dale Fye
3/20/2012
I'm assuming you guys meant IIF( ) not IFF( )
;-)
You could also have used:
[Price] * (1-iif([DatePosted] > #3/4/2012#, .05, .03))
Iff([DatePosted] > #3/4 /2012#, [Price] - 0.05 * [Price], [Price] - 0.03 * [Price])
mx