Use the Where argument of the OpenReport method. Create a report that
presents the data you want and base it on the same table or query you use for
the report.
The current record should have a field that is unique. You use that in the
Where argument to tell the report which record to print. For example
purposes, let's say it is an employee record and that we use the employee's
ID number:
txtEmpID - is the control on the form
[EMP_ID] - is the field in the table and it is a text field
strWhere = "[EMP_ID] = '" & Me.txtEmpID & "'"
DoCmd.OpenReport "rptEmpRec", acNormal, ,strWhere
Using a unique field value will mean that only the current record will be
printed. On the other hand, lets say you wanted to print all the records for
department 309 and the Department Number is a numeric field
strWhere = "[DEPT_NO] = " & Me.txtDept
DoCmd.OpenReport "rptEmpRec", acNormal, ,strWhere
Now you will get a report for all the employees in the department that the
current record employee is in.