Based a report on the current filtered recordset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On my form I go to various controls and use the filter by and filter
excludingselection. Eventually getting a small number of records in my
current records set. I would like my reports to use only the current
filtered recordset. The filtering will always change.

How do I base a report on this everchanging filtered recordset.

thanks
 
Eric,
Here's a method I used...
If the form is not filtered, return just the current form record. If it is filtered,
use the same filter as the form.
The ELSE is the part your interested in...
(use your own object names)

Private Sub Report_Open(Cancel As Integer)
If Forms!frmCustomers.FilterOn = False Then
Me.Filter = "CustID = Forms!frmCustomers!CustID"
Me.FilterOn = True
Else
Me.Filter = Forms!frmCustomers.Filter
Me.FilterOn = True
End If
End Sub
 
Back
Top