dbTalk Databases Forums  

runtime error 2501 ApplyFilter action was cancelled

comp.databases.ms-access comp.databases.ms-access


Discuss runtime error 2501 ApplyFilter action was cancelled in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dkohel@gmail.com
 
Posts: n/a

Default runtime error 2501 ApplyFilter action was cancelled - 01-22-2008 , 10:23 PM






What is wrong with the following code?
I am trying to filter a form based on the selection of a combobox
named cblPRD

Dim currentFilter
currentFilter = "[prdID] = '" & Me!cboPRD & "'"
Filter = currentFilter
DoCmd.ApplyFilter , Filter

When the code executes, I trap and receive the following error...

Error Number: 2501
Error Description: The ApplyFilter action was cancelled

Reply With Quote
  #2  
Old   
Salad
 
Posts: n/a

Default Re: runtime error 2501 ApplyFilter action was cancelled - 01-23-2008 , 09:42 AM






dkohel (AT) gmail (DOT) com wrote:

Quote:
What is wrong with the following code?
I am trying to filter a form based on the selection of a combobox
named cblPRD

Dim currentFilter
currentFilter = "[prdID] = '" & Me!cboPRD & "'"
Filter = currentFilter
DoCmd.ApplyFilter , Filter

When the code executes, I trap and receive the following error...

Error Number: 2501
Error Description: The ApplyFilter action was cancelled
I sometimes set filters with code similar to

Me.Filter = "ID = 123"
Me.FilterOn = True

Twilight Zone
http://www.youtube.com/watch?v=a1sf2CzEq0w


Reply With Quote
  #3  
Old   
dkohel@gmail.com
 
Posts: n/a

Default Re: runtime error 2501 ApplyFilter action was cancelled - 01-23-2008 , 09:36 PM



Seems as though this issue only occurs when I have the prdID set as a
primary key. When I remove the primary key setting on that field, it
works fine. Any ideas why?

On Jan 22, 8:23 pm, "dko... (AT) gmail (DOT) com" <dko... (AT) gmail (DOT) com> wrote:
Quote:
What is wrong with the following code?
I am trying to filter a form based on the selection of a combobox
named cblPRD

Dim currentFilter
currentFilter = "[prdID] = '" & Me!cboPRD & "'"
Filter = currentFilter
DoCmd.ApplyFilter , Filter

When the code executes, I trap and receive the following error...

Error Number: 2501
Error Description: The ApplyFilter action was cancelled


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.