I have the code to get a print dialogue box for each form also for each tab/page, but it's hectic for the users to click OK for each page. Please give me suggestions. Here is the code to get the print dialogue for each form.
Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Dim strMsg As String
Dim strTitle As String
strMsg = "The Were No Records Returned." & vbCrLf & _
"Print has been Canceled."
strTitle = " No Records Returned"
If Me.Form.HasData Then
DoCmd.RunCommand acCmdPrint
DoCmd.Close acForm, Me.NAME
Else
MsgBox strMsg, vbInformation + vbOKOnly, strTitle
DoCmd.Close acForm, Me.NAME
End If
Err_Form_Activate:
Resume Next
DoCmd.Close acForm, Me.NAME
End Sub
Thanks,
Jay.
|