You need to tell Access which record you want to print. The following sub will do just that. Just change the field and table names to suit.
Firstly, create a query using the table that has the record you want to print.
WHERE is the criteria required.
SELECT TableName.*, TableName.[PrimaryKeyFieldName]
FROM TableNaame
WHERE (((TableName.[PrimaryKeyFieldName])=[Forms]![FormName]![PrimaryKeyFieldName]));
Private Sub cmdPrintCurrentRecord_Click()
On Error GoTo Err_PrintCurrentRecord_Click
Dim strDocName As String
strDocName = "ReportName"
' Print Current record in a report, using YourQueryNamequery to print
' report for current record.
DoCmd.OpenReport strDocName, acViewNormal, "YourQueryName"
Exit_PrintCurrentRecord_Click:
Exit Sub
Err_PrintCurrentRecord_Click:
' If action was cancelled by the user, don't display an error message.
Const conErrDoCmdCancelled = 2501
If (Err = conErrDoCmdCancelled) Then
Resume Exit_PrintCurrentRecord_Click
Else
MsgBox Err.Description
Resume Exit_PrintCurrentRecord_Click
End If
End Sub