Consulting

Results 1 to 2 of 2

Thread: VBA filter 2 or more values

  1. #1

    VBA filter 2 or more values

    i have filter value on button like this: Me.Filter = "name='" & Me.field10.Value & "'"

    but how to do 2 or 3 values? I tried this but it didn't work: Me.Filter = "name='" & Me.field10.Value & "'" & "count>" & Me.field20.value

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    You have to use the actual And, not the shorthand &
    here is an example

    Me.Filter = "[Customer Name] = 'Elie' AND [EntryDate] = #" & testdate & "#"

Posting Permissions

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