Using MS Access/Open and closing forms
I am using access 2010. I have a database with a main menu (unbound form), with the option to open forms and reports or close the database.
When I open a form from the main menu, the selected form (or report) opens on top of the Main Menu Form.
I find this untidy, and confusing for the other users of the database.
How do I close the Main Menu form when I open the other form so that the newly opened form is the only one on the screen?
I would appreciate your help.
I thought I had answered this.
DoCmd.Close acForm, "formname", acSaveNo
Or you could just hide it:
Me.Visible = False
Use either immediately after you open the new form.
Then, in the On Close event of the calling form you need to reopen the menu or set Visible to True. In that case, use:
Forms!formname.Visible = True
Use that before you close the current form.
Hope this helps,
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA