Print Current Record From Form

  • Thread starter Thread starter eschlep via AccessMonster.com
  • Start date Start date
E

eschlep via AccessMonster.com

I am trying to print a form and I created a button that takes the form to a
report however it leaves out all of the subforms in the form. My code for
the button is
Private Sub Print_Click()

Dim strReportName As String
Dim strCriteria As String

If NewRecord Then
MsgBox "This record contains no data. Please select a record to print
or Save this record." _
, vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "LNREVIEWQ33"
strCriteria = "[Field2]= '" & Me![Field2] & "'"


DoCmd.OpenReport strReportName, acViewPreview, , strCriteria

End If
End Sub

Thanks
 
If you have subforms in your main form and you want all that in your
report, you can create subreports that mirror recreate those for
printout and then just pass a filter in the Open event of the report.
 
Would this have the form and subform in the same report. How would i do this.
 
Back
Top