Hi there,
I have a report based on a query where:
WHERE (((tblSchedule.[Cheque Date]) Between [Enter start cheque date] And [Enter end cheque date]) AND ((tblSchedule.Decision)=[Enter Decision A or R (Approvals/Refusals)]))
I would like the event procedure to display a report named "rptPrimaryCategory" if they select Decision "A", or display "rptPrimaryCategoryR" if they select Decision "R".
Here is my On_Click:
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim stDocName As String
stDocName = "rptPrimaryCategory"
DoCmd.OpenReport stDocName, acPreview
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
I think that's all you need. Please be specific, I'm not a programmer!
Thanks so much.
I have a report based on a query where:
WHERE (((tblSchedule.[Cheque Date]) Between [Enter start cheque date] And [Enter end cheque date]) AND ((tblSchedule.Decision)=[Enter Decision A or R (Approvals/Refusals)]))
I would like the event procedure to display a report named "rptPrimaryCategory" if they select Decision "A", or display "rptPrimaryCategoryR" if they select Decision "R".
Here is my On_Click:
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim stDocName As String
stDocName = "rptPrimaryCategory"
DoCmd.OpenReport stDocName, acPreview
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
I think that's all you need. Please be specific, I'm not a programmer!
Thanks so much.