Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Location
    Colorado
    Posts
    2

    Unanswered: Filtering & Sorting subforms

    I'm attempting to create multiple filters for a subform, selectable by the user (i.e. "Show Pending", "Show Closed", "Show All", etc.). Unfortunately, I am thus far unsuccessful. I've attempted using macros to set the filter property of the subform, but that doesn't seem to work, nor does it seem to work to use the button wizard to create a generic filter button on the subform. What am I doing wrong? Any suggestions?

  2. #2
    Join Date
    Jan 2003
    Location
    Netherlands
    Posts
    10
    Have you tried to place buttons on your form-header with:

    Private Sub cmd_Click()

    Me.RecordSource = "SELECT tTable.* FROM tTable " & _
    "ORDER BY tTable.fField1;"
    Me.Requery

    End Sub

    HTH
    Henny.

  3. #3
    Join Date
    Jan 2003
    Location
    Netherlands
    Posts
    10
    Sorry, i forgot the WHERE clause:


    Me.RecordSource = "SELECT tTable.* FROM tTable " & _
    " WHERE tTable.fFieldPending = true " & _
    " ORDER BY tTable.fField1;"

    (assuming the field Pending is Boolean)

  4. #4
    Join Date
    Jan 2003
    Location
    Colorado
    Posts
    2

    Cool

    Very cool...thank you! This was the info I needed and it works great!

Posting Permissions

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