I am updating one of my apps and I want to make one process very simple.
I have many forms. And they don't all open at once. But I am so tired of typing the same code for closing the form. Since they all do the same thing.
I want to be able to write a function that I can refer to in the form for closing that form and opening the main form.
This is what all my close buttons code looks like
DoCmd.Openform "frm-MainSwitchboard", acNormal.
I type this so many times and if the main form changes I have to go back in and update all those modules.
I just want one function that does the same except it is generic and will close the opened form that has the focus.. I do have three forms that open but are hidden. They need to stay that way.