I have a form which displays user comments. On the Load event, I apply a
filter in VBA using the following code:
''''''''''''''''''''''''
Me.Filter = "StudentID = " & Me.StudentID & " AND PracticalIDNumber = " &
Me.PracticalIDNumber & " AND PractCatID = " & Me.PractCATID & " AND
InstGrader = " & Me.InstGrader & " AND UODeduction > 0 AND UOComments is null"
Me.FilterOn = True
''''''''''''''''''''''''''
When I trace through, I get to the line "Me.FilterOn = True" and it gives me
the following message:
"Run-time error '2001'
You canceled the previous operation"
Any ideas why I would be getting this error when trying to filter? I have
another form that filters a different type of comment, but the logic is the
same. I don't have any problems with that one. Any suggestions?
david epsom dot com dot au - 28 Apr 2006 08:16 GMT
It automatically cancels if there is an error, but most typically
it cancels because it can't save the current record.
What do you get if you put a Save Record command there?
(david)
>I have a form which displays user comments. On the Load event, I apply a
> filter in VBA using the following code:
[quoted text clipped - 16 lines]
> the
> same. I don't have any problems with that one. Any suggestions?
davecoats622 - 28 Apr 2006 15:04 GMT
I changed the code so I don't have to use a filter. Thanks
> I have a form which displays user comments. On the Load event, I apply a
> filter in VBA using the following code:
[quoted text clipped - 13 lines]
> another form that filters a different type of comment, but the logic is the
> same. I don't have any problems with that one. Any suggestions?