Preview a report

J

JStreet

I would like to preview a report rather than print it but do not where to put
the acpreview option in the following line of code:

Private Sub Preview_Click()
On Error GoTo Err_Preview_Click

Dim stDocName As String
stDocName = "Information Sheets"

DoCmd.OpenReport "Information Sheets", , , "[VerticalName]= '" &
Me.Vertical & "'"


Exit_Preview_Click:
Exit Sub

Err_Preview_Click:
MsgBox Err.Description
Resume Exit_Preview_Click

End Sub

Thanks
 
D

Douglas J. Steele

DoCmd.OpenReport "Information Sheets", acViewPreview, , "[VerticalName]=
'" & Me.Vertical & "'"
 

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