For Each varItem In Me!searchownercontributor.ItemsSelected
strFilter6 = strFilter6 & "Reports![Query - Contributors2 subreport2]![Contributors] = " & _
"'" & Me![searchownercontributor].ItemData(varItem) & "' OR "
Next
' the next bit of code will subtract out the last "OR"
If strFilter6 <> "" Then
strFilter6 = Left(strFilter6, Len(strFilter6) - 4)
Else: strFilter6 = "Reports![Query - Contributors2 subreport2]![Contributors] Like '*'"
End If
Above is code I am attempting to us to filter a main report by a filed in a sub-report. Does anyone have suggestions as to how I can get this done. The sub report's field is Reports![Query - Contributors2 subreport2]![Contributors].
Thanks
strFilter6 = strFilter6 & "Reports![Query - Contributors2 subreport2]![Contributors] = " & _
"'" & Me![searchownercontributor].ItemData(varItem) & "' OR "
Next
' the next bit of code will subtract out the last "OR"
If strFilter6 <> "" Then
strFilter6 = Left(strFilter6, Len(strFilter6) - 4)
Else: strFilter6 = "Reports![Query - Contributors2 subreport2]![Contributors] Like '*'"
End If
Above is code I am attempting to us to filter a main report by a filed in a sub-report. Does anyone have suggestions as to how I can get this done. The sub report's field is Reports![Query - Contributors2 subreport2]![Contributors].
Thanks