S
sharann via AccessMonster.com
Hello,
I am using the following code below to print a report based on
the current record in the form. My problem is, I have a unique identifer
[Emp ID #] that can have multiple dates associated with it. If a user goes
into the form and wants to only print preview that current record on the form
the report does view it but also all the other dates associated with the
[Emp ID #].
How do I alter my code to show only that specific record on the screen minus
the other dates?
Private Sub Scott_report_Click()
On Error GoTo Err_Scott_report_Click
Dim stDocName As String
stDocName = "rpt_Scott"
DoCmd.OpenReport stDocName, acPreview, , "[Emp ID #] = Forms![Scott
Hallum]![Emp ID #]"
Exit_Scott_report_Click:
Exit Sub
Err_Scott_report_Click:
MsgBox Err.Description
Resume Exit_Scott_report_Click
End Sub
Any help is greatly appreciated...
Sharann
I am using the following code below to print a report based on
the current record in the form. My problem is, I have a unique identifer
[Emp ID #] that can have multiple dates associated with it. If a user goes
into the form and wants to only print preview that current record on the form
the report does view it but also all the other dates associated with the
[Emp ID #].
How do I alter my code to show only that specific record on the screen minus
the other dates?
Private Sub Scott_report_Click()
On Error GoTo Err_Scott_report_Click
Dim stDocName As String
stDocName = "rpt_Scott"
DoCmd.OpenReport stDocName, acPreview, , "[Emp ID #] = Forms![Scott
Hallum]![Emp ID #]"
Exit_Scott_report_Click:
Exit Sub
Err_Scott_report_Click:
MsgBox Err.Description
Resume Exit_Scott_report_Click
End Sub
Any help is greatly appreciated...
Sharann