IIF questions with < or > signs

  • Thread starter Thread starter Burton
  • Start date Start date
B

Burton

am trying to write a query in Access, but I am having problems. If I write
it like this:

IIf([Forms]![Form1]![Option22]=True,[Forms]![Form1]![Text6], "") than it
works just fine.

However, as soon as I add a > or < sign in the code, it stops working. This
is what I want it to say:

IIf([Forms]![Form1]![Option22]=True,>=[Forms]![Form1]![Text6], "").

Do you know why the > causes the query not to work? Do you know how I can
fix it?
 
The 'arguments' must be complete expression, not just part of an expression.
As example, you cannot writh:

abs( 4 + )

because that makes no sense ( the absolute value of four plus ... what? )

So, either try:


FieldOrComputedExpression >=
IIf([Forms]![Form1]![Option22]=True,[Forms]![Form1]![Text6], "")


either

IIf([Forms]![Form1]![Option22]=True,FieldOrComputedExpression
=[Forms]![Form1]![Text6], true)



If you use that statement as criteria, write it, at the first line, as
computed expression and add, as criteria line:

<> 0


(since 0 = false, and anything not null <> 0 is true)




Vanderghast, Access MVP



Burton said:
am trying to write a query in Access, but I am having problems. If I write
it like this:

IIf([Forms]![Form1]![Option22]=True,[Forms]![Form1]![Text6], "") than it
works just fine.

However, as soon as I add a > or < sign in the code, it stops working.
This
is what I want it to say:

IIf([Forms]![Form1]![Option22]=True,>=[Forms]![Form1]![Text6], "").

Do you know why the > causes the query not to work? Do you know how I can
fix it?
 
Back
Top