You may have to open a new db, save it, then import all objects into it. Then I'd check to see if
a) OPTION EXPLICIT is at the top of every code module, and if not, add it. Google it if you are unfamiliar. I'd also set the vb editor option to "require variable declaration"
b) keep compiling until you find and fix every non-declared variable and/or add every project reference (library) that may be missing
I think your problem is a lot bigger than how you call a query, or don't.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.