界面/窗体/控件
Access获取窗体在记录跳转时触发了多少个事件
2005-02-04 11:29:09

 

将下列代码复制到模块中,并按F5运行,然后打开“窗体1”,做一些动作即可。 Function setEvent()     Dim p As Property     For Each p In Forms("窗体1").Properties         If Left(p.Name, 2) = "On" _         Or Left(p.Name, 5) = "After" _         Or Left(p.Name, 6) = "Before" Then             p.Value = "=msgbox('" & p.Name & "')"         End If     Next p End Function Function resumeEvent()     Dim p As Property     For Each p In Forms("窗体1").Properties         If Left(p.Name, 2) = "On" _         Or Left(p.Name, 5) = "After" _         Or Left(p.Name, 6) = "Before" Then             p.Value = ""         End If     Next p End Function