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?