M
Mary
I have a button on a form with the code below to open a report to display the
current year data. The report has a subreport in the footer section with a
summary. How can I get the subreport to also pull the current year on open.
I have a combo box where the user can select the year as well, and I'd like
the subreport to display the summary for whatever year report is selected.
Thanks in advance for your help.
Mary
Private Sub Command89_Click()
On Error GoTo Err_Command89_Click
Dim stDocName As String
Dim strWhere As String
Dim strCondition As String
stDocName = "Monthly"
strWhere = "Year(DueDate) = Year(Date())"
DoCmd.OpenReport stDocName, acPreview
Exit_Command89_Click:
Exit Sub
Err_Command89_Click:
MsgBox "There is no data for this report"
Resume Exit_Command89_Click
End Sub
current year data. The report has a subreport in the footer section with a
summary. How can I get the subreport to also pull the current year on open.
I have a combo box where the user can select the year as well, and I'd like
the subreport to display the summary for whatever year report is selected.
Thanks in advance for your help.
Mary
Private Sub Command89_Click()
On Error GoTo Err_Command89_Click
Dim stDocName As String
Dim strWhere As String
Dim strCondition As String
stDocName = "Monthly"
strWhere = "Year(DueDate) = Year(Date())"
DoCmd.OpenReport stDocName, acPreview
Exit_Command89_Click:
Exit Sub
Err_Command89_Click:
MsgBox "There is no data for this report"
Resume Exit_Command89_Click
End Sub