Public Function FBtnPrint()
On Error Resume Next
Dim Response As Integer
If IsNull(PRepName) = True Or Len(RTrim(LTrim(PRepName))) = 0 Or PRepName = "Null" Then
MsgBox "Sorry! Report Option is Currently Not Available for this Form...", vbExclamation, "User Alert"
Else
Response = MsgBox("Do You Wish To See Preview?", vbQuestion + vbYesNo + vbDefaultButton2, "User Alert")
If PRepCond <> "Null" Then
If Len(LTrim(RTrim(PRepCond))) > 0 Then
If Response = 6 Then DoCmd.OpenReport PRepName, acViewPreview, , PRepCond
If Response <> 6 Then DoCmd.OpenReport PRepName, acViewNormal, , PRepCond
Else
If Response = 6 Then DoCmd.OpenReport PRepName, acViewPreview
If Response <> 6 Then DoCmd.OpenReport PRepName, acViewNormal
End If
Else
If Response = 6 Then DoCmd.OpenReport PRepName, acViewPreview
If Response <> 6 Then DoCmd.OpenReport PRepName, acViewNormal
End If
End If
End Function