J
jamiecockrill
Hi there, I'm quite new to Access, so please be gentle!
I've created a Report to set the format in which I want my records
printed, however at the moment, when I click the Print Record button
that I created with a Wizard, if prints every single record in the
table I referred it to.
What I have is a 'View Work Requests' form called "View Request2" which
prompts me for a Work request number (field in the table is called
'Project Reg Number'). It then searches the database and returns the
data to the form. I essentially want a button that prints that record.
I've tried sticking an SQL WHERE query in, but it evidently doesn't do
very much!
Thanks for you help
Jamie
PS, the code for that section is:
Private Sub print_report_Click()
On Error GoTo Err_print_report_Click
DoCmd.OpenReport "Print Report", acNormal, "[Project Reg
Number]=View Request2![Project Reg Number]"
Exit_print_report_Click:
Exit Sub
Err_print_report_Click:
MsgBox Err.Description
Resume Exit_print_report_Click
End Sub
I've created a Report to set the format in which I want my records
printed, however at the moment, when I click the Print Record button
that I created with a Wizard, if prints every single record in the
table I referred it to.
What I have is a 'View Work Requests' form called "View Request2" which
prompts me for a Work request number (field in the table is called
'Project Reg Number'). It then searches the database and returns the
data to the form. I essentially want a button that prints that record.
I've tried sticking an SQL WHERE query in, but it evidently doesn't do
very much!
Thanks for you help
Jamie
PS, the code for that section is:
Private Sub print_report_Click()
On Error GoTo Err_print_report_Click
DoCmd.OpenReport "Print Report", acNormal, "[Project Reg
Number]=View Request2![Project Reg Number]"
Exit_print_report_Click:
Exit Sub
Err_print_report_Click:
MsgBox Err.Description
Resume Exit_print_report_Click
End Sub