Results 1 to 3 of 3

Thread: Query formating

  1. #1
    Join Date
    Oct 2005
    Posts
    8

    Unanswered: Query formating

    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_type> field 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

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Your syntax is a little out - I prefer Switch over nested Iifs anyway. How about:
    Code:
    Switch([data_order]![order_type]='2';"Normal";[data_order]![order_type]='8';"Extra")
    I've stuck with the ;s. I use ,s but I've been reliably informed that the ; is the international way to do it
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Oct 2005
    Posts
    8
    that worked great, and internation is the way to go.
    Once did a database for a customer in Tailand. Tested it on 6 different configurations here (Germany). Of course it did not run there. Another reason to keep away from queries that contain certain options. They do not always work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •