Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Then statement query error

Status
Not open for further replies.

toddgarner

Programmer
Sep 23, 2004
1
US
I am trying to enter the following simple code in a query

label: If ([Members]!
  • )>5 then "x"

    where if a value in a table is greater than five the query column "label" prints an "x", however, it keeps telling me I have invalid syntax and that I might have entered an operand without an operator. Sory this is so basic, I don't normally use this for databases any chance anyone can tell me what I can do to fix this?

    Todd Garner
    toddgarner
    t_garner03@yahoo.com
 
Todd
Have you tried
label: IIf([Members!
  • >5,"x","")

    This assumes that you want to show nothing if the value is 5 or less.

    Actually, if your query is only referencing one table, Members, then you don't need the table name in the expression.


    Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top