Results 1 to 3 of 3
  1. #1
    asyancey is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    1

    Printing subform's filtered datasheet using a report

    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.

    Notice the record count in the video below before generating the report and the count in the report. The report doesn't filter out my selections.

    View my form here http://www.screencast.com/t/uWuZafXkh2C

    Any suggestions?
    Yancey

  2. #2
    Join Date
    Jun 2009
    Location
    Vietnam
    Posts
    4
    Try following:

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

  3. #3
    nater303 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    1
    Thank you Very much.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 16
    Last Post: 06-03-2009, 07:01 AM
  2. Report Printing Error
    By gjohnson71 in forum Reports
    Replies: 4
    Last Post: 03-07-2009, 12:36 PM
  3. refresh datasheet as text changes
    By mkhan in forum Forms
    Replies: 0
    Last Post: 09-06-2008, 07:46 AM
  4. Filtered Print Query
    By Lupus in forum Queries
    Replies: 0
    Last Post: 08-17-2007, 02:50 AM
  5. Query datasheet screen
    By Scott in forum Queries
    Replies: 0
    Last Post: 08-07-2007, 03:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums