Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009

    Unanswered: Access 2007: Problem printing report with filtered data

    I have a form that uses an unbound combo box using a qry for a source as does the subform. This data is for viewing not editing. I filter the datasheet using the column heading dropdown but I need to create a button that will allow the user to print a report using the filtered data from the datasheet. Using the vb statement:

    DoCmd.OpenReport "rptSoftwareAndUser", acViewPreview, , "[tblTrackerSysSft]![sw_name]=[Forms]![CopyfrmSoftwareAndUsers]![sw_name]"

    will print the data filtered by my combo box but will not filter out the data selected from the datasheet heading drop downs.

    See how it operates. Notice the filtered record count and then see the record count that prints in the report.
    Any suggestions?


  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    Any suggestions?
    Don't use datasheets?

    Try pulling the Filter property while it's showing you the right data. See what the form's filter is set to. If it's not set or not fully describing what is being viewed, then I would say there is no way to do it with datasheets.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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