Ok, should have done a screen shot, and I could go back and recreate it and get one, but not in the time I have right now… 😀
I was working in an app and had a Class outside of a form that had a function to get a reference to the form by name if it had been lost.
A button on the form used “DoCmd.Close” to close the form.
If I had a report open that I had just switched tabs from the order to the form, then hit the close button on the form, it would run DoCmd.Close which would then fire a Form Resize event, but again, only if I had just switched tabs from a report in print preview mode.
This event would call a function in the class which referenced the form multiple times, but since DoCmd.Close had started running, the form was not actually loaded any more and I would trigger an error referencing the Forms object with the form name like this: Forms(“frmMyForm”)
These errors were being trapped and ignored.
However, in this situation, then all of the tabs in the navigation (Access navigation tabs, not tab controlsl) disappeared and could no longer be clicked. This made navigation impossible or even easily switching between forms at all. There was no way to resize the forms and I just had to close them out.
I fixed this by adding an if statement to wrap around the offending code and only execute it if the form was still loaded.
Whew!