Harry Taylor
Registered User.
- Local time
- Today, 09:59
- Joined
- Jul 10, 2012
- Messages
- 73
Please Help,
I'm trying to print a Report specific to the record i'm viewing on my Form.
I've created a Report linked to the Table - "SCJobsheet"
I've created a button in my Form;
Name; cmdSCJobsheet
Caption: Print Record
OnClick: [Event Procudure]
Private Sub cmdSCJobsheet_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "SCJobsheet"
strCriteria = "[ACCOUNT]='" & Me![ACCOUNT] & "'"
DoCmd.OpenReport strReportName, acViewPreview, strCriteria
The Report is opening but shows Every record (Not just the one I'm viewing in the Form.
Any ideas where I'm going wrong?
I'm trying to print a Report specific to the record i'm viewing on my Form.
I've created a Report linked to the Table - "SCJobsheet"
I've created a button in my Form;
Name; cmdSCJobsheet
Caption: Print Record
OnClick: [Event Procudure]
Private Sub cmdSCJobsheet_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "SCJobsheet"
strCriteria = "[ACCOUNT]='" & Me![ACCOUNT] & "'"
DoCmd.OpenReport strReportName, acViewPreview, strCriteria
The Report is opening but shows Every record (Not just the one I'm viewing in the Form.
Any ideas where I'm going wrong?