Private Sub Print_Preview_Click() 'Button
On Error GoTo Err_Print_Preview_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Inbound_Report"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport stDocName, acPreview, , "[Inbound.tblInitials] = """ & Me.tblInitials & """ And [tblInbound_ID] = " & tblInbound_ID
Exit_Print_Preview_Click:
Exit Sub
Err_Print_Preview_Click:
MsgBox Err.Description
Resume Exit_Print_Preview_Click
End Sub
Private Sub Email_Inbound_Report_Click()
On Error GoTo Err_Email_Inbound_Report_Click
If [Forms]![Inbound]![tblEmp_First_Name] <> "" Then
DoCmd.OpenForm "CC_Email", , , , , , Me.Name
Else
Dim Msg, Style, Title, Response
Msg = Me.tblInitials & " report does not contain a First Name!" & _
Chr(13) & Chr(13) & "Continue?"
Style = vbExclamation + vbYesNo
Title = "Error!"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
DoCmd.OpenForm "CC_Email", , , , , , Me.Name
Else ' User chose No.
End If
End If
Exit_Email_Inbound_Report_Click:
Exit Sub
Err_Email_Inbound_Report_Click:
MsgBox Err.Description
Resume Exit_Email_Inbound_Report_Click
End Sub