I am building a database and I’m using a switchboard. Opening a form is working with the macro I am using. But the problem is going back to the switchboard. The macro I’m using leaves the form open.
What I want the button to do is:
- Check if there is an open, unsaved record and if so warn the user to safe his work
- Close the form that is in use (name of the first form is GSM formulier)
- Open the switchboard form (whitch is named Switchboard)
I am not sure if the closing and opening are in the right order or it is wiser to first open the switchboard and after that close the form ’ GSM formulier’ . What is your take on this?
the macro I am using for opening the form is:
Sub OpenSwitchboard const sNewDocumentName="Switchboard" ' This opens the switchboard oNewFormDocument=ThisDatabaseDocument.FormDocuments.getbyname(sNewDocumentName).open End Sub
I am not a programming superhero so any help is welcome.