At first I figured that you imported the old objects into a new database file as opposed to doing a Save As but you left out the custom menu or toolbar being referenced. However, it probably would have choked on the line that sets the btnFilter object if that was the case. I can imagine why you're trying to manipulate commandbar objects before a form closes, but not in the form close event if that custom menu is tied to that form somehow. I would have coded it in the Unload event. Maybe it worked before because it was closing slower than it is now?
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.