S
Stuart McCall
Another thing to do and this will be a pain but open every query (and
And a more thorough method in this regard is to paste the following code
into a standard module and run it. The queries listed beginning with ~sq are
hidden queries attached to various objects like form controls.
Public Sub ListQdfs()
Dim qdf As DAO.QueryDef
For Each qdf In CurrentDb.QueryDefs
Debug.Print qdf.Name
Next
End Sub
My guess is that you'll turn up something in one of the ~sq items. When you
spot something suspicious, type this in the immediate window:
?CurrentDb.QueryDefs("QueryName").SQL
(replace the obvious)
maybe unused forms, if there are any) and make sure that query isn't
hanging around somewhere. I know you are sure but it must be lurking
somewhere.
And a more thorough method in this regard is to paste the following code
into a standard module and run it. The queries listed beginning with ~sq are
hidden queries attached to various objects like form controls.
Public Sub ListQdfs()
Dim qdf As DAO.QueryDef
For Each qdf In CurrentDb.QueryDefs
Debug.Print qdf.Name
Next
End Sub
My guess is that you'll turn up something in one of the ~sq items. When you
spot something suspicious, type this in the immediate window:
?CurrentDb.QueryDefs("QueryName").SQL
(replace the obvious)