If Then Statements

L

LV

I need to use an "If Then" statement in a text box. I currently have the
following statement:

=IIf([Date Analyzed]="<#01/12/09#","4.76","2.50")

What I had intended was for the box to show the result "4.76" for any date
before 01/12/09 and "2.50" for any date after 01/12/09. All the text box
shows is 2.50, regardless of the date.

What am I doing wrong?
--
 
M

MikeJohnB

Try this

=IIf([Date Analyzed]<=#01/12/09#,4.76,2.5)

For an unbound text box

Does this help??????

Kindest Regards
Mike B
 
M

MikeJohnB

That reply is for less than or equal to #01/12/09#

if you want less than but not equal to #01/12/09#

Leave out the equals sign

Note, this assumes you have your date formatted as mm/dd/yy and not dd/mm/yy
 

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