I think it might be my code that could be the problem.
Dim strACCode As String
Dim strFilter As String
' Build criteria string for A/C Code field
If IsNull(Me.txtAccCode) Then
strACCode = "Like '*'"
strACCode = "='" & Me.txtAccCode & "'"
' "='" & Me.cmbReference.Value & "'"
strFilter = "[Report]![RptLookupRecords].[Report]![SubFrmLookupRecords]![Acc_Code] " & strACCode
' Apply the filter and switch it on
.Filter = strFilter
.FilterOn = True
I think the line bolded above could be causing the problem. Or is it something else?
Note: RptLookupRecords is the report that I want to filter and SubFrmLookUpRecords is a subreport inside that report.