code to close my current form on pressing the button to open my Main Menu

Hi @John Lee,

You can simplify handling the opening and closing of forms using the following snippet:
Code:
Private Sub cmdOpenfrmFrontEnd_Click()
    DoCmd.BrowseTo acBrowseToForm, "frmFrontEnd"
End Sub
The BrowseTo command also supports a Where clause, which is useful if you need to specify the record the form should display. It's a handy approach for what you're trying to achieve.

Let me know if you need further clarification.
 

Users who are viewing this thread

Back
Top Bottom