HI,
I currently have a report which allows me to filter out data that I dont need to view, I have a button next to each row on my report and when the user clicks this button it hides the row of data. this is all working perfectly.
But As I try to use this report on a form as a sub-report, the filter feature i have created stops working, and an error message appears:
Run-Time error '5': Invalid procedure call or argument.
This is my code below, as I step through my code the error message appear on the line ' If Not .FilterOn Then .FilterOn = True'
Many thanks for your help in advance.
I currently have a report which allows me to filter out data that I dont need to view, I have a button next to each row on my report and when the user clicks this button it hides the row of data. this is all working perfectly.
But As I try to use this report on a form as a sub-report, the filter feature i have created stops working, and an error message appears:
Run-Time error '5': Invalid procedure call or argument.
This is my code below, as I step through my code the error message appear on the line ' If Not .FilterOn Then .FilterOn = True'
Code:
With Me
If Right(.filter, 1) = ")" Then
.filter = Left(.filter, Len(.filter) - 1) & ",'" & .Enquiry_No & "')"
Else
.filter = "[EnquiryNo] NOT IN (PartNo)"
End If
If Not .FilterOn Then .FilterOn = True
End With
Many thanks for your help in advance.