ApplyFilter event runnning twice

L

Louverril

This code runs twice in Access 2007 - when the user right clicks on a field
andinitiates a filter.

It only runs once in Acccess 2003 - although the right click menu isn't the
same.

It doesn't matter what the form is - try it yourself it will run twice - I
need it because you can't allow filters on a subform if the main form has
Allow Filters set to no (and nor does anyone else judging by the responce
I've had to several stion on that subject).

Any ideas?


Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
'prevent filtering of cases - causes errors.

MsgBox "You cannot sort or filter cases here."
Cancel = True
Exit Sub

End Sub

Lou
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top