473,324 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Run-time error '2501' The ApplyFilter actions was canceled.

Hello,

I am trying to a pply a filter on a access 2013 subform, from a query I created to filter data from a table. When I click the bottom to run the filter, I get the following error:

Run-time error '2501'
The ApplyFilter actions was canceled.


Here is my code:

Private Sub cmdSerialNumber_Clic()

DoCmd.ApplyFilter , "qrySerialNumber"

End Sub


Please, if anyone can help!!!

Thank you,
Nov 1 '16 #1
1 2089
jforbes
1,107 Expert 1GB
My guess is that you don't need the comma:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.ApplyFilter "qrySerialNumber"
According to the documentation, it's the first parameter that should be used for a Query and the second parameter is for a Where Condition: DoCmd.ApplyFilter Method (Access)
Nov 3 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: fearblanco | last post by:
Hello - I am receiving the below error message when attempting to open a report. This database is used by approximately 20 users and only one user is having this problem (even I can't duplicate...
3
by: robertsheeran | last post by:
Hi all, I have an database created that I currently use on MS Access 02 and now want to use on a different computer with MS Access 03. All the reports and queries run perfect on Access 02 but...
1
by: Haole88 | last post by:
I am brand new to VBA - so if this is a brain-donor question...sorry!! I have a search button on my switchboard with two fields next to it - Status and Technician. I can search for both fields...
2
by: dkohel | last post by:
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 = " = '" & Me!cboPRD & "'" Filter =...
3
by: razjafry | last post by:
Hi, I am trying to create a combo box to search record on the base of ID but it gives runtime error message 2501 "the openform action was cancelled" all the times. I posted this question before but...
7
sassy2009
by: sassy2009 | last post by:
Hello, I am running an insert query from xl spreadsheet using the DoCmd.RunSQL to insert values from the spreadsheet into the Access database. When i run this query it gives an error saying "...
8
by: tomric | last post by:
Hi, I have an option group to select different reports, each report is based off a query that asks for criteria for that report. I have no problem opening any the querys through the group regardless...
1
by: Aftab Hussain | last post by:
I have following code for a start-up form: Private Sub Form_Timer() 'Close startup form and open logon form DoCmd.Close acForm, "Startup_Form" DoCmd.OpenForm "Logon_Form" End Sub And i am...
3
by: Marc Brown | last post by:
I keep on getting the same error message and I don't know how to either solve the problem or prevent it from showing the error. I have set up a switchboard item that opens a report. When the report...
4
mjoachim
by: mjoachim | last post by:
I've reviewed numerous solutions to others with the same error and for some reason I just can't seem to get past my issue... please help! Private Sub Form_BeforeUpdate(Cancel As Integer) ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.