Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filter - Or (2003+)

    Quick question, what's the correct syntax to add an 'Or' into a filter? I'd like the filter by 'E' or 'B' (so I get both remaining). Here's the current;

    Me.Filter = "tblLegis.HnSorE = 'E'"
    Me.FilterOn = True

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter - Or (2003+)

    Either
    <code>
    Me.Filter = "tblLegis.HnSorE = 'E' Or tblLegis.HnSorE = 'B'"
    </code>
    or
    <code>
    Me.Filter = "tblLegis.HnSorE In ('E', 'B')"
    </code>
    The latter is easier, especially if you'd like to add more options.

  3. #3
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter - Or (2003+)

    That's the job!

    Cheers mate

Posting Permissions

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