Run-time error '2001'

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
 
D

Douglas J. Steele

Check to make sure you haven't mistyped the name of the query. (Yeah, the
error message is a little misleading, isn't it!)
 
G

Guest

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

Top