Results 1 to 3 of 3
  1. #1
    Alex Morris is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    1

    Syntax Error (missing operator) in query expression

    I am trying to make a calculated field via an "iif" statement in my query and I am getting an "#error" message in the boxes under the calculated field name. When I try to click on the down arrow at on the right side of the field name I am getting a message that pops up saying "Syntax Error (missing operator) in query expression" Can anyone tell me how to fix this iif statement so I yield the results I need. The iif statement I am using is "Additional Shipping Charge: IIf([Slices Bought]<=150,"50","85")" Thanks in advance.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try: Shipping Charge:= IIf([Slices Bought]<=150,50,85)

  3. #3
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    FYI, any time you use quotation marks, it indicates that the value is of a string type. Even if you are using a number, once you put it in quotations it becomes a string value.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 06-02-2013, 04:34 AM
  2. Replies: 9
    Last Post: 01-22-2013, 04:23 PM
  3. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  4. Replies: 3
    Last Post: 08-19-2011, 09:06 AM
  5. Replies: 1
    Last Post: 10-07-2009, 07:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums