Slight Adjustment needed to Code

B

Bob

I want to be able to view this Report before printing
How do I adjust this code?

Private Sub Command27_Click()
On Error GoTo Err_Command27_Click

Dim stDocName As String

stDocName = "rptHoldingNames"
DoCmd.OpenReport stDocName, acNormal

Exit_Command27_Click:
Exit Sub

Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click

End Sub

Thanks in advance.........Bob Vance
 
B

Bob

Got it thanks, worked it out
Private Sub Command27_Click()
DoCmd.OpenReport "rptHoldingNames", acViewPreview, , , , "HoldingNames"
End Sub
 

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

Similar Threads


Top