Limit Report Print Preview to One Record

G

Guest

I've created a report but want it to print only the record that's selected by
the print preview button. Right now the report displays all records.

Here's some details.

The report queries data from 3 related tables:

tblProfiles
tblPKCGPhysicalAttributes
tblPKCGMaterialAttributes

tblProfiles is related to the other two with one-to-one relationships.

The Event Procedure for the print preview button is:

Private Sub cmdprvwpkcgrpt_Click()
On Error GoTo Err_cmdprvwpkcgrpt_Click

Dim stDocName As String

stDocName = "rptPKCorrugated"
DoCmd.OpenReport stDocName, acPreview

Exit_cmdprvwpkcgrpt_Click:
Exit Sub

Err_cmdprvwpkcgrpt_Click:
MsgBox Err.Description
Resume Exit_cmdprvwpkcgrpt_Click

End Sub

THANKS!!!
 

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