Print one-page of report

Z

zSplash

I have a form/report that I use for input. I want my code to print only the
current page of the form/report. I have a commandlButton (cmbPrintRecord)
with the following code on the click_event:
Private Sub cmdPrintRecord_Click()
Dim strDocName As String, strWhere As String
strDocName = "rMain"
strWhere = "[pk_ID] = " & Me.[pk_ID]
DoCmd.OpenReport strDocName, acViewNormal, , strWhere
End Sub

The pk_ID is the primary key, a number. My code prints all the pages of the
form. What's wrong with my code?

TIA
 

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