B
bicyclops
I've set up the following code
Dim frm As Access.Form
For Each frm In Application.Forms
If frm.Caption <> Screen.ActiveForm.Caption Then frm.Close
Next
The idea is to close all forms but the switchboard when the corresponding
button on the switchboard is pressed. I keep getting an error message: Run
Time Error 2465, and the program complains about the frm.close statement.
Is there a way to make this work or is there a better way to close all forms?
Thanks in advance.
Dim frm As Access.Form
For Each frm In Application.Forms
If frm.Caption <> Screen.ActiveForm.Caption Then frm.Close
Next
The idea is to close all forms but the switchboard when the corresponding
button on the switchboard is pressed. I keep getting an error message: Run
Time Error 2465, and the program complains about the frm.close statement.
Is there a way to make this work or is there a better way to close all forms?
Thanks in advance.