Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    May 2002
    Location
    Patagonia Region Chile
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello. Hope all is well.

    This works
    Private Sub Command109_Click()

    Me.FilterOn = False

    Me.Filter = "[patagon_pedido].[pedidonum] IN (1099, 1100,1101,78)"

    Me.FilterOn = True
    End Sub

    What I really need to do is to get the series in parentheses there from a textbox on the form.

    I think I finally got the syntax errors worked out and arrived at the following but it gives me a data type mismatch error

    Private Sub Command109_Click()
    Dim strControlnums As String
    strControlnums = Me.controlnumlist
    Me.FilterOn = False

    Me.Filter = "[patagon_pedido].[pedidonum] IN ('" & strControlnums & "')"

    Me.FilterOn = True
    End Sub

    Hovering over the code shows that it is picking up the values from the text box correctly.
    Pedidonum is an autonum field..

    Any thoughts?

    Thanks

    Jason

  2. #2
    WS Lounge VIP Browni's Avatar
    Join Date
    Dec 2009
    Location
    Rochdale, UK
    Posts
    1,652
    Thanks
    38
    Thanked 161 Times in 139 Posts
    Try this

    Me.Filter = "[patagon_pedido].[pedidonum] IN (" & strControlnums & ")"

  3. #3
    Star Lounger
    Join Date
    May 2002
    Location
    Patagonia Region Chile
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ian.

    That did it. Thanks. I had an extra set of single quotes making it be evaluated as text?

    Thanks very much, again.

    Jason Gustafson

Posting Permissions

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