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?
.
.
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?