Microsoft Access VBA中的事件订阅服务器

时间:2017-02-11 06:47:30

标签: vba ms-access events access-vba

有没有办法让事件订阅者在Microsoft Access下的VBA中进行即时窗口(例如使用Debug.Print)进行调试?

1 个答案:

答案 0 :(得分:1)

此代码是所有Microsoft Access发射对象的一站式...

Option Explicit
'* In a class module

Private WithEvents o_PageEvents As Access.Page
Private WithEvents o__ControlInReportEvents As Access.[_ControlInReportEvents]
Private WithEvents o_LabelEvents As Access.Label
Private WithEvents o_RectangleEvents As Access.Rectangle
Private WithEvents o_LineEvents As Access.Line
Private WithEvents o_ImageEvents As Access.Image
Private WithEvents o_CommandButtonEvents As Access.CommandButton
Private WithEvents o_OptionButtonEvents As Access.OptionButton
Private WithEvents o_OptionButtonInOptionEvents As Access.[_OptionButtonInOption]
Private WithEvents o_CheckBoxEvents As Access.CheckBox
Private WithEvents o_CheckBoxInOptionEvents As Access.[_CheckBoxInOption]
Private WithEvents o_OptionGroupEvents As Access.OptionGroup
Private WithEvents o_BoundObjectFrameEvents As Access.BoundObjectFrame
Private WithEvents o_TextBoxEvents As Access.TextBox
Private WithEvents o_ListBoxEvents As Access.ListBox
Private WithEvents o_ComboBoxEvents As Access.ComboBox
Private WithEvents o_ObjectFrameEvents As Access.ObjectFrame
Private WithEvents o_PageBreakEvents As Access.PageBreak
Private WithEvents o_ToggleButtonEvents As Access.ToggleButton
Private WithEvents o_ToggleButtonInOptionEvents As Access.[_ToggleButtonInOption]
Private WithEvents o_PaletteButtonEvents As Access.PaletteButton
Private WithEvents o_SubFormEvents As Access.SubForm
Private WithEvents o_SubReportEvents As Access.SubReport
Private WithEvents o_CustomControlEvents As Access.CustomControl
Private WithEvents o_CustomControlInReportEvents As Access.[_CustomControlInReport]
Private WithEvents o_TabControlEvents As Access.TabControl
Private WithEvents o_SectionEvents As Access.Section
Private WithEvents o_SectionInReportEvents As Access.[_SectionInReport]
Private WithEvents o_PageHdrFtrInReportEvents As Access.[_PageHdrFtrInReport]
Private WithEvents o_FormEvents As Access.Form
Private WithEvents o_ReportEvents As Access.Report
Private WithEvents o_References_Events As Access.References
Private WithEvents oDispAttachmentEvents As Access.Attachment
Private WithEvents oDispEmptyCellEvents As Access.EmptyCell
Private WithEvents oDispWebBrowserControlEvents As Access.WebBrowserControl
Private WithEvents oDispNavigationButtonEvents As Access.NavigationButton
Private WithEvents oDispNavigationControlEvents As Access.NavigationControl

这些链接中提供了一些使用示例| Adding Classes WithEvents to MS Access Form | MS Access WithEvents in Class Module for OnClick Event |。

Stack Overflow类似问题Click event handler withevents