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
 
Back
Top