Run-time error '2001'

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use the DCount function:

If DCount("*", "qryName") = 0 Then
MsgBox "Query returns no records"
End If

It works just great for several queries, but when I try to use a particular
query I get:
Run-time error '2001':
You canceled the previous operation

Does anyone have any idea why?
Thank you, Judy
 
Check to make sure you haven't mistyped the name of the query. (Yeah, the
error message is a little misleading, isn't it!)
 
To rule out a problem with the name of the query, I copied it and gave it a
simple name. It was when I clicked on the query to run it that I realized
this query asks for a parameter. Mystery solved. I appreciate your response
(which led to my discovery).

Thank you,
Judy
 

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

Similar Threads

Access Dcount (multiple criteria) 3
run time error 2001 2
run time error 2001 - You canceled the previous operation 2
Access MS Access DCount function problem 0
Form to run query Error 2001 1
vba coding 4
runtime error 2001 1
Run-time error '2001' 3

Back
Top