C
Claes D
Hello.
I am trying to set a filter to a form.
Heres the code I am trying to use, but I get error 2001 all the time.
If FilterOption = 2 Then
Me.Filter = "Shop = '1'"
Me.FilterOn = True
ElseIf FilterOption = 3 Then
Me.Filter = "Shop = '2'"
Me.FilterOn = True
ElseIf FilterOption = 4 Then
Me.Filter = "Shop = '3'"
Me.FilterOn = True
Else
Me.FilterOn = False
End If
Am I on the wrong track here?
After the error message, I can see that the filter is on, but it hasnt
actually filtered anything.
It still shows all the records even though it says "filtered".
What am I doing wrong?
BR
Claes
I am trying to set a filter to a form.
Heres the code I am trying to use, but I get error 2001 all the time.
If FilterOption = 2 Then
Me.Filter = "Shop = '1'"
Me.FilterOn = True
ElseIf FilterOption = 3 Then
Me.Filter = "Shop = '2'"
Me.FilterOn = True
ElseIf FilterOption = 4 Then
Me.Filter = "Shop = '3'"
Me.FilterOn = True
Else
Me.FilterOn = False
End If
Am I on the wrong track here?
After the error message, I can see that the filter is on, but it hasnt
actually filtered anything.
It still shows all the records even though it says "filtered".
What am I doing wrong?
BR
Claes