print form and subform

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

Guest

I am trying to print the current form and its subform. It is only printing
my form and not its subform. Here is the code I'm using.
Private Sub cmdPrintServiceLog_Click()
On Error GoTo Err_cmdPrintServiceLog_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection

Exit_cmdPrintServiceLog_Click:
Exit Sub

Err_cmdPrintServiceLog_Click:
MsgBox Err.Description
Resume Exit_cmdPrintServiceLog_Click


End Sub

I don't know if it makes a difference that the subform is also a form that
I'm using in the main form as the subform.
 
Forms are not made for printing, reports are.

Build a report and add a button to your form to print the report, not the
form.
 
Back
Top