Below is a code I'm trying to use to filter a report by the value in Combo14.
The value in Combo 14 is determined by the value in Combo 8 (cascading)
The code I'm using causes an "object required" error.
The value in Combo 14 is determined by the value in Combo 8 (cascading)
The code I'm using causes an "object required" error.
Code:
On Error GoTo Err_cmdReport_Click
Dim stDocName as String
If Me.Combo8.Value = "Functional Area" Then
stDocName = "rptReport"
DoCmd.OpenReport stDocName, acPreview, , rptReport.fldFuncArea = Me.Combo14.Value
End If
If Me.Combo8.Value = "Title" Then
stDocName = "rptReport"
DoCmd.OpenReport stDocName, acPreview, , rptReport.fldTitle = Me.Combo14.Value
End If
Exit_cmdReport_Click:
Exit Sub
Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click
End Sub