falcondeer
Registered User.
- Local time
- Today, 13:50
- Joined
- May 12, 2013
- Messages
- 101
Hi
I have the following code for the command button to print a record in the subform which lies in the main form:
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptWA2"
strCriteria = "P_ID= " & Nz(Me!P_ID, 0)
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
The problem is that if I have more than one record in the subform, it will always print the first record no matter what .
Now, how could I print specific record in the subform.
Thanks.
I have the following code for the command button to print a record in the subform which lies in the main form:
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptWA2"
strCriteria = "P_ID= " & Nz(Me!P_ID, 0)
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
The problem is that if I have more than one record in the subform, it will always print the first record no matter what .
Now, how could I print specific record in the subform.
Thanks.