Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / April 2006

Tip: Looking for answers? Try searching our database.

Filtering in a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
davecoats622 - 27 Apr 2006 19:31 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.