Results 1 to 2 of 2
  1. #1
    ajolson1964 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Posts
    10

    If Statement

    Can I use the if statement to work with "In" example
    If [var] in("ABCD","EFGH") Then
    Do something
    End if

    OR do I have to do the OR statement?
    If [Var] = "Abcd" or [Var] = "EFGH"


    Then
    Do something
    End if

  2. #2
    ajolson1964 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Posts
    10
    Case statement is the answer.

    Select Case (var)
    Case "abcd",'EFGH"
    Do something
    End Select

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

Similar Threads

  1. Help with IF statement
    By mkallover in forum Programming
    Replies: 7
    Last Post: 01-04-2011, 04:47 PM
  2. Need Help with SQL Statement
    By Hank44 in forum Programming
    Replies: 3
    Last Post: 11-08-2010, 05:49 PM
  3. IIf Statement
    By dref in forum Forms
    Replies: 2
    Last Post: 07-16-2010, 02:46 AM
  4. IIf Statement...HELP!
    By bdhFS in forum Queries
    Replies: 5
    Last Post: 05-19-2010, 07:55 AM
  5. how to use IF then statement
    By ronnie4 in forum Access
    Replies: 1
    Last Post: 03-17-2009, 11:32 PM

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