Results 1 to 5 of 5
  1. #1
    Join Date
    May 2004
    Posts
    73

    Question Unanswered: Trouble grouping strings in an if statement in Access?

    I have an if statement, but im not sure of the syntax to group multiple strings. None of the examples work below. Here are some examples of what I
    tried to do.

    If RMA_ITEM_ID_CONTROL = "500001, 500100, 030015, 030210" Then

    OR

    If RMA_ITEM_ID_CONTROL = "500001,500100,030015,030210" Then

    OR

    If RMA_ITEM_ID_CONTROL = "500001","500100","030015","030210" Then

    OR

    If RMA_ITEM_ID_CONTROL = "500001", "500100", "030015", "030210" Then

    OR

    If RMA_ITEM_ID_CONTROL = "500001" Or "500100" Or "030015" Or "030210" Then


    Im obviously confused, cpild someone shed some light on this for me.

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    If RMA_ITEM_ID_CONTROL IN ("500001, 500100, 030015, 030210" )Then

    Next Question ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    May 2004
    Posts
    73
    Thank you so much.

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by M Owen
    If RMA_ITEM_ID_CONTROL IN ("500001, 500100, 030015, 030210" )Then

    Next Question ...
    Correction: ... IN ("500001", "500100", "030015", "030210" ) ...
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    May 2004
    Posts
    73
    Quote Originally Posted by M Owen
    Correction: ... IN ("500001", "500100", "030015", "030210" ) ...
    correction, you were right the first time but instead of IN its =

    = ("500001, 500100, 030015, 030210")

Posting Permissions

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