Menú contextual personalizado
Publicado por Jaime (6 intervenciones) el 16/02/2020 02:51:58
Tengo access 2013 y pretendo poner menú contextual para los informes, tengo este codigo...
En propiedades del informe, barra de menús contextuales, me aparece efectivamente cmdReportRightClick, abro el informe y el menú aparece sin problema, pero cuando cierro y abro access me da error, 'No se encuentra el objeto cmdReportRightClick
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Sub CreateReportShortcutMenu()
Dim cmbRightClick As Office.CommandBar
Dim cmbControl As Office.CommandBarControl
Set cmbRightClick = CommandBars.Add("cmdReportRightClick", msoBarPopup, False, True)
With cmbRightClick
Set cmbControl = .Controls.Add(msoControlButton, 2521, , , True)
cmbControl.Caption = "Impresión rápida"
Set cmbControl = .Controls.Add(msoControlButton, 15948, , , True)
cmbControl.Caption = "Seleccionar páginas"
Set cmbControl = .Controls.Add(msoControlButton, 247, , , True)
cmbControl.Caption = "Configuración de página"
Set cmbControl = .Controls.Add(msoControlButton, 2188, , , True)
cmbControl.BeginGroup = True
cmbControl.Caption = "Enviar como archivo adjunto"
Set cmbControl = .Controls.Add(msoControlButton, 12499, , , True)
cmbControl.Caption = "Guardar como PDF/XPS"
Set cmbControl = .Controls.Add(msoControlButton, 923, , , True)
cmbControl.BeginGroup = True
cmbControl.Caption = "Cerrar reporte"
End With
Set cmbControl = Nothing
Set cmbRightClick = Nothing
End Sub
En propiedades del informe, barra de menús contextuales, me aparece efectivamente cmdReportRightClick, abro el informe y el menú aparece sin problema, pero cuando cierro y abro access me da error, 'No se encuentra el objeto cmdReportRightClick
Valora esta pregunta


0