Ok. I think that I have solved your issues.
I believe that your dB is corrupted. It will not let me save any changes to it and it will not close completely when it closes. You should try to do the following; Run a compact and repair.
Your query would not work because in your DoCmd.OpenQuery line you had the name of the query as "maintable". When I looked at your db, you had actually named your query "Maintable Query." This is the type of stuff I was referring to when I said you need to pay close attention to the details.
As to the clear the filter button, I added back the Me.requery and it runs just fine.
As to getting a parameter box when you run the query, this will happen when you run the query independently of the search form. If the search form is not used, then the query is looking to that form for data inserted in the text boxes you refer to in the query.
Lastly, to get this to work on my machine, I had to create a new dB and import your form, table and query into that dB. You may wish to do the same, since I strongly believe that your dB is corrupt.
Good luck
Alan
Bookmarks