在MS Access表单中单击按钮时出错 [英] Error when button click in MS Access form

查看:232
本文介绍了在MS Access表单中单击按钮时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在ms Access VBA中调用按钮单击事件时出现此错误.

您作为事件属性设置输入的表达式OnClick产生以下错误:
您输入的表达式具有Microsoft Office找不到的名称.
*该表达式可能不会导致宏的名称,用户定义函数的名称或[事件过程].
*评估函数,事件或宏时可能出错.


我的代码是这样的

Hi all,

I got this error when call the button click event in the ms access VBA.

The expression OnClick you entered as the event property setting produced the following error:
The expression you entered has a name that Microsoft Office cannot find.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been an error evaluating the function, event or macro.


My code is like this

Private Sub Button1_Click()
MsgBox "HI"
End Sub



我找不到解决方法..
谁能帮我...



I cant find the solution..
can any one help me...

推荐答案

检查对MS Office对象库的引用.
Check references to MS Office Object Library.


这篇关于在MS Access表单中单击按钮时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆