Results 1 to 3 of 3
  • Thread Tools
  1. 4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is there an easy way to take the filtered results of a filter by form and use that recordset as the basis for a hard-copy report (specifically a phone list). For example, my client might want a phone list of all the clients who speak Spanish and Portuguese or women in certain postal codes. I need to be quite flexible in the possibilities. Since I already have a working filter form, it is just a question of grabbing the filtered recordset. Any points in the right direction would be appreciated.

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    When you filter a form, the filter is accessible as a string via me.filter.

    When you preview (or print) a report you can apply a Where clause to limit the report to records that match the criteria of the Where clause.

    So you can use the form filter as the Where clause.

    e.g. (air code)

    Code:
    Dim strfilter as string
    Dim strReport as string
    strfilter = me.filter
    strReport = "rptSomeReport"
    Docmd.OpenReport strReport, acViewPreview, ,strfilter
    Regards
    John



  4. 4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, John. That is what I was hoping to find out. I'll post back if I have any questions.

    Peter

Posting Permissions

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