关于按钮:离开文本框时,MS-Access缺少事件

MS-Access Missing Event When Leaving Text Box

我有一个用于过滤列表框的文本框。文本框旁边有一个命令按钮。我在文本框中输入一些过滤器数据,然后将鼠标移至命令按钮并单击。文本框中的所有适当事件都会触发,但命令按钮的click事件不会触发。

我正在Windows 8虚拟机(在Mac上为Parallels)上运行Access 2013。

这是正常活动吗?

以下是来自以下活动的事件跟踪:
在文本框中输入字符"农场",然后单击搜索命令按钮。
注意-命令按钮不会触发任何事件。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
mIndustryFind==> tbxSearchText_Enter
mIndustryFind==> tbxSearchText_GotFocus
mIndustryFind==> tbxSearchText_KeyDown
mIndustryFind==> tbxSearchText_KeyPress
mIndustryFind==> tbxSearchText_Change
mIndustryFind==> tbxSearchText_KeyUp
mIndustryFind==> tbxSearchText_KeyDown
mIndustryFind==> tbxSearchText_KeyPress
mIndustryFind==> tbxSearchText_Change
mIndustryFind==> tbxSearchText_KeyUp
mIndustryFind==> tbxSearchText_KeyDown
mIndustryFind==> tbxSearchText_KeyPress
mIndustryFind==> tbxSearchText_Change
mIndustryFind==> tbxSearchText_KeyUp
mIndustryFind==> tbxSearchText_KeyDown
mIndustryFind==> tbxSearchText_KeyPress
mIndustryFind==> tbxSearchText_Change
mIndustryFind==> tbxSearchText_KeyUp
mIndustryFind==> tbxSearchText_BeforeUpdate
mIndustryFind==> tbxSearchText_AfterUpdate
mIndustryFind==> tbxSearchText_Exit
mIndustryFind==> tbxSearchText_LostFocus
mIndustryFind==> tbxSearchText_MouseMove

在表单的代码模块中注释现有的单击事件过程。然后使用"设计视图"中的窗体,打开命令按钮的属性表,然后单击"单击时"事件的省略号,以在窗体的模块中创建一个新的过程Stubbing。向该Stubbing添加一个简单的语句。

1
MsgBox"button clicked"

如果该新过程可行,请用原始代码替换其主体。

提出此建议的原因是,我发现Access偶尔会"失去跟踪"事件过程---尽管它们存在于模块中,但它们在运行时无法识别。我描述的步骤始终可以纠正这些问题。

但是,尽管您的情况听起来有些相似,但我完全不相信这就是解释。这可能会花很长时间,但是排除它应该不花很多钱。