Printing out Form + Subform

  • Thread starter Thread starter Edm
  • Start date Start date
E

Edm

Hi,

I have a form/subform combo that creates an invoice. My
problem is, when I try to print out the single invoice, I
get all the related records in the subform as well.

Is there a way to tell access to print out only the parent
form and the current record displayed in the subform?

Any help is appreciated.

Thanks,

Edm
 
One method I use often is shown below. There are many others like design
queries that are filtered by your form then base the report on that query.
Another is to use the where clause in the open report method.

Private Sub Report_Open(Cancel As Integer)

Me.RecordSource = Forms![frmMain].Form.RecordSource

With Forms![frmMain].Form
If .OrderByOn Then
Me.OrderBy = .OrderBy
Me.OrderByOn = True
End If
If .FilterOn Then
Me.Filter = .Filter
Me.FilterOn = True
End If
End With

End Sub
 
Back
Top