Help formating a query field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • stevenrec

    #1

    Help formating a query field

    I'm back.
    Do not use queries too often and have trouble formating a field:

    misc: if(([data_order]![order_type])='2';"Normal)" ;
    if(([data_order]![order_type])='8';"Extra")

    Basically want it to check the number in the <order_typefiel d and if
    it is 2, type Normal and if it is 8 type Extra.

    Thought I could get it to work with IIF, but have not had any luck yet.
    Is this even possible? I am sure I have done it before, but cannot find
    where.

    Please help.

    Steven

  • Kc-Mass

    #2
    Re: Help formating a query field

    Fewer parenthesis, commas instead of semi-colons, IIF instead of IF.

    If the order_type field is numeric, remove parenthesis from around the 2 and
    8.

    misc: iif([data_order]![order_type]="2","Normal ",
    iif([data_order]![order_type]="8","Extra" , "Unknown?")

    "stevenrec" <steven.rector@ stevenrec.comwr ote in message
    news:1160472450 .606585.63350@h 48g2000cwc.goog legroups.com...
    I'm back.
    Do not use queries too often and have trouble formating a field:
    >
    misc: if(([data_order]![order_type])='2';"Normal)" ;
    if(([data_order]![order_type])='8';"Extra")
    >
    Basically want it to check the number in the <order_typefiel d and if
    it is 2, type Normal and if it is 8 type Extra.
    >
    Thought I could get it to work with IIF, but have not had any luck yet.
    Is this even possible? I am sure I have done it before, but cannot find
    where.
    >
    Please help.
    >
    Steven
    >

    Comment

    Working...