I'd like to be able to close all open code windows using a keyboard shortcut
Tried this but nothing seemed to happen when hitting Shift + Control + Q
with
Tried this but nothing seemed to happen when hitting Shift + Control + Q
Code:
Submacro +^Q
RunCode Function Name CloseWindows()
StopMacro
with
Code:
Public Function CloseWindows()
Dim aob As AccessObject
With CurrentProject
For Each aob In .AllModules
If aob.IsLoaded Then
DoCmd.Close acModule, aob.Name, acSaveYes
End If
Next aob
End With
End Function