Microsoft Access can't find the table or query <>

  • Thread starter Thread starter Eric N
  • Start date Start date
E

Eric N

Guest
I just created a dynamic query using a querydef. Here is a piece of the code:
.
.

If client.Value Then
lngnumber = ClientID
strSQL = strSQL & "ClientID" _
& " = " & lngnumber & " And "
End If
.
.
Set qdfSearch = dbsValidation.CreateQueryDef("dynamic query", strSQL)
.
DoCmd.OpenReport "Search Results", acViewPreview, "dynamic query"

When I return from the report I get the message "Microsoft Access can't find the table or query <"dynamic query">.

This is an inconsistent error and I would like to know if anyone has experienced this before?
 
The error code is 2580. I put it into simple error handling and it works just fine.
 

Users who are viewing this thread

Back
Top Bottom