MS Access运行code宏找不到我的程序 [英] MS Access RunCode Macro cannot find my procedure

查看:620
本文介绍了MS Access运行code宏找不到我的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是张贴这一点,因为我没能在任何地方找到一个解决方案。我终于想通了。那种傻真的。

I'm only posting this since I wasn't able to find a solution anywhere. I finally figured it out. Kind of silly really.

当在一个Access宏使用运行code属性,我试图运行从我的全球模块子。我正在错误您输入的EX pression具有的数据库的不能找到一个函数名称。我想不出有什么问题了。我跟着大家的意见,张贴在这个问题上,这主要是以下几点:

When using the RunCode property within an Access Macro, I was trying to run a Sub from my global module. I was getting the error "The expression you entered has a function name that database can't find." I couldn't figure out what the issue was. I followed the advice of everyone that posted on this issue, which was mostly the following:

  1. 使用()在程序名称末尾
  2. 请不要使用=的程序名称前

仍然没有工作!

推荐答案

然后我仔细阅读错误消息。它提到,它无法找到函数名。显然,运行code属性特别要求一个功能没有一分。所以,我只是改变了我的子发挥作用,它工作得很好!

THEN I read the error message carefully. It mentions that it could not find the FUNCTION name. Apparently, the RunCode property specifically requires a "Function" not a Sub. So, I simply changed my Sub to Function and it worked fine!

希望这有助于。

这篇关于MS Access运行code宏找不到我的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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