it didn't work
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
Dim stDocName As String
Dim MyForm As Form
stDocName = "Form1"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub