G
Guest
Hi
I have this Report that I draged a "Query" in to it. I need to have i
to open by "Response report number" that is in the "Query" and th
Query name is "qryOutsideResponses" and the Query field i
"ResReportNumber
This code opens the first report. The Report can have one to three
out side responses - (Police Dept., Fire Dept., and Paramedic
As long as it will find a match number with the "Response" in tha
field it will be fine
What do I need to do? Please help
Thank you
Private Sub PrintByPoliceReport__Click(
On Error GoTo Err_PrintByPoliceReport__Clic
-----------------------------------------------------------------------------
Dim stDocName As Strin
Dim intUserRespond As Intege
Dim strResReportNumber As Strin
Dim strWhere As Strin
Dim cancel As Intege
If Me.Dirty Then 'save any edit
Me.Dirty = Fals
Els
strResReportNumber = InputBox("Please enter the Police Repor
Number you wish to print", "View BPL by Respond Report Number"
If IsNumeric(strResReportNumber) = False The
Exit Su
Els
strResReportNumber = CInt(strResReportNumber
strWhere = "[ResReportNumber] = """ & strResReportNumber
"""
stDocName = "rptMasterBPLReport
DoCmd.OpenReport stDocName, acViewPreview, , strWher
DoCmd.RunCommand acCmdZoom10
intUserRespond = MsgBox("Do you want to print this report?"
vbOKCancel, "Print Report Window"
If intUserRespond = vbOK The
cancel = Tru
DoCmd.OpenReport acPrintAll, acViewPrevie
Els
DoCmd.Clos
End I
End I
'End I
Exit_PrintByPoliceReport__Click
Exit Su
Err_PrintByPoliceReport__Click
MsgBox Err.Descriptio
Resume Exit_PrintByPoliceReport__Clic
End Sub
I have this Report that I draged a "Query" in to it. I need to have i
to open by "Response report number" that is in the "Query" and th
Query name is "qryOutsideResponses" and the Query field i
"ResReportNumber
This code opens the first report. The Report can have one to three
out side responses - (Police Dept., Fire Dept., and Paramedic
As long as it will find a match number with the "Response" in tha
field it will be fine
What do I need to do? Please help
Thank you
Private Sub PrintByPoliceReport__Click(
On Error GoTo Err_PrintByPoliceReport__Clic
-----------------------------------------------------------------------------
Dim stDocName As Strin
Dim intUserRespond As Intege
Dim strResReportNumber As Strin
Dim strWhere As Strin
Dim cancel As Intege
If Me.Dirty Then 'save any edit
Me.Dirty = Fals
Els
strResReportNumber = InputBox("Please enter the Police Repor
Number you wish to print", "View BPL by Respond Report Number"
If IsNumeric(strResReportNumber) = False The
Exit Su
Els
strResReportNumber = CInt(strResReportNumber
strWhere = "[ResReportNumber] = """ & strResReportNumber
"""
stDocName = "rptMasterBPLReport
DoCmd.OpenReport stDocName, acViewPreview, , strWher
DoCmd.RunCommand acCmdZoom10
intUserRespond = MsgBox("Do you want to print this report?"
vbOKCancel, "Print Report Window"
If intUserRespond = vbOK The
cancel = Tru
DoCmd.OpenReport acPrintAll, acViewPrevie
Els
DoCmd.Clos
End I
End I
'End I
Exit_PrintByPoliceReport__Click
Exit Su
Err_PrintByPoliceReport__Click
MsgBox Err.Descriptio
Resume Exit_PrintByPoliceReport__Clic
End Sub