Everytime I close and open the database the first thing
you get that prompt when opening, and again when closing? Opening makes some sense; not so much closing, unless code on form closing is involved.
Possibly a particular form is set to open by default when the db opens and it is directly or indirectly causing your query to run - and that query is looking for a form field on a form that isn't open at the time.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.