riti90
Registered User.
- Local time
- Today, 00:54
- Joined
- Dec 20, 2017
- Messages
- 44
Hi everyone,
I'm trying to add a button to a Form for disabling the ShortcutMenu of all forms.
Is it any chance I can Realize this?
I've gotten so far with the code for opening all the forms but I cannot finish it.
Thank You..
I'm trying to add a button to a Form for disabling the ShortcutMenu of all forms.
Is it any chance I can Realize this?
I've gotten so far with the code for opening all the forms but I cannot finish it.
Thank You..
Public Function DisableShortMenu1()
'On Error GoTo Error_Handler
Dim frm As AccessObject, dB As Object
--Dim ShrtcutMnu As AccessObjectProperties -- maybe I'm doing wrong here...
--shrtcutmenu = frm.Properties(ShortcutMenu) -- or here...
Set dB = Application.CurrentProject.AllForms
For Each frm In dB
DoCmd.OpenForm frm.Name, acDesign, , , , acWindowNormal
ShrtcutMnu = False
'DoCmd.Close acForm, FrmName, acSaveNo
Next frm
Error_Handler_Exit:
On Error Resume Next
Set frm = Nothing
Set dB = Nothing
Exit Function
Error_Handler:
MsgBox "The following error has occured." & vbCrLf & vbCrLf & _
"Error Number: " & Err.Number & vbCrLf & _
"Error Source: CloseAllOpenFrms" & vbCrLf & _
"Error Description: " & Err.Description, _
vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Function
Last edited: