I am using the following module is there a simple way that I dont have to mention each and every form to close the open forms and open SWITCHBOARD
Option Compare Database
'------------------------------------------------------------
' Close_All
'
'------------------------------------------------------------
Function Close_All()
On Error GoTo Close_All_Err
DoCmd.OpenForm "SWITCHBOARD", acNormal, "", "", acAdd, acNormal
DoCmd.Close acForm, "AcTitleFrm"
DoCmd.Close acForm, "PurchaseFRM"
DoCmd.Close acForm, "SalesFRM"
DoCmd.Close acForm, "Form For Purchase Dept Reports"
DoCmd.Close acForm, "Company Accounts"
DoCmd.Close acForm, "Challan"
DoCmd.Close acForm, "Invoice"
DoCmd.Close acForm, "Payments"
DoCmd.Close acForm, "Items Form"
DoCmd.Close acForm, "Stock Report Sales & Purchase"
DoCmd.Close acForm, "FORMS SWITCH"
DoCmd.Close acForm, "switch reprts"
Close_All_Exit:
Exit Function
Close_All_Err:
MsgBox Error$
Resume Close_All_Exit
End Function