I ll like to view a report from filtered records of a subform. I used a commandbutton based on a query to filter the data and i need the report to carry all the filtered data of the form, ( filtered data, ordered by)
Private Sub CmdApplyFilter_Click()
Me![subform].form.RecordSource = "select * from Table2 where Table2.status not in ('complete','pending')"
' Previewing my filtered data
Private Sub CmdPreviewReport_Click()
Dim rpt As Access.Report
Dim stDocName As String
stDocName = "Request_Report"
DoCmd.OpenReport stDocName, acPreview, , Me.subform.form.Filter, , Me.subform.form.OrderBy
this does not give me the filtered results i really need