ForeColor Question For Report

R

Ryis

Hello,
I have a report that i need to be able to print blank. I have used the
following to open the report to preview and this works, it has all the fields
white so there is no data showing..the only problem is I have some check
boxes that the controls are based on IIF statements. This causes them to
show Err in all the boxes. Is there a way to keep this from happening??

Private Sub Blank_CPAR_Click()
On Error GoTo Err_Blank_CPAR_Click

Dim stDocName As String

stDocName = "CPAR REPORT"
DoCmd.OpenReport stDocName, acViewPreview, , "[CPAR ID] = " & [CPAR ID]
& ForeColor = 16777215

Exit_Blank_CPAR_Click:
Exit Sub

Err_Blank_CPAR_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Blank_CPAR_Click

End Sub

Thanks in advance

Ryan
 
M

MikeJohnB

Have you considered trapping the error at the IIF Statement? I presume that
the error is present because some part of the calc has null value. Can you
post a couple of the IIF Statements?

Regards

Mike B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top