I have many forms in my database, but I don't want the user to have more than the current one open as they navigate through the menus.
Example: The user leaves frmMain (by clicking any one of several macros on that form which take the user elsewhere to another form). When the new form opens, the previous form (frmMain in this case) will close automatically.
Please be specific on what code I need and how to do it or where it goes. I got myself in a mess trying to put a Form CLOSE code in on_focus, on_lost_focus, deactivate, on_activate, and so forth. It didn't do the job. What do you recommend?
Example: The user leaves frmMain (by clicking any one of several macros on that form which take the user elsewhere to another form). When the new form opens, the previous form (frmMain in this case) will close automatically.
Please be specific on what code I need and how to do it or where it goes. I got myself in a mess trying to put a Form CLOSE code in on_focus, on_lost_focus, deactivate, on_activate, and so forth. It didn't do the job. What do you recommend?