Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Posts
    22

    Smile Unanswered: Help with Switch Function

    Hi
    I need somthing like that in a query:
    Switch([FORMS]![Respond]![Status]=1,4,[FORMS]![Respond]![Status]=2,< 4)
    What is the syntax when the value is 'less then' in Switch?

    TIA

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: Help with Switch Function

    Originally posted by orna
    Hi
    I need somthing like that in a query:
    Switch([FORMS]![Respond]![Status]=1,4,[FORMS]![Respond]![Status]=2,< 4)
    What is the syntax when the value is 'less then' in Switch?

    TIA
    anyVariable = IIf(Test1 > 1000, "Gross", "Klein")

    IIF(([FORMS]![Respond]![Status]=1, do the code if equals 1 , ([FORMS]![Respond]![Status]=4, do the code if it equals 4 , do code of else))

  3. #3
    Join Date
    Jun 2002
    Posts
    22
    Thanks for the answer, but I need it within a query.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by orna
    Thanks for the answer, but I need it within a query.
    Write the following n your Query

    variable: IIF(([FORMS]![Respond]![Status]=1, "Respond=1" , ([FORMS]![Respond]![Status]=4, "Respond=4", "Respond <> 1 and Respond <> 4"))

    Where variable is any name and will be a field in your query.

Posting Permissions

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