Microsoft 365 and Office | Access | For education | Other
A family of Microsoft relational database management systems designed for ease of use.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi can you help?
i want to on close of a form close every form that may be open in background then go to a main screen.
if there a way to do this rather than added code to each form to close individually
thanks again
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Public Sub CloseAllForms()
Dim n As Integer
For n = Application.Forms.Count - 1 To 0 Step -1
DoCmd.Close acForm, Forms(n).Name, acSaveNo
Next n
DoCmd.OpenForm "frmMainScreen"
End Sub