无法使用setLocalVar在数据宏中设置公共函数 [英] Can Not set a Public Function in a Data Macro using setLocalVar

查看:248
本文介绍了无法使用setLocalVar在数据宏中设置公共函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MS Access 2013,并且过去曾使用Setlocalvar在数据宏中执行用户定义的公共VBA函数。当我进入系统并尝试它时,我得到一个错误"Microsoft Access无法解析表达式"。我认为
我的表达式定义可能有问题,所以我复制了一个正在工作并把它放在另一个表上的东西,我得到了相同的错误信息。此外,当我转到具有SetLocalvar设置的现有数据宏的表时,
执行vba代码时,它们都在左侧有感叹号。设置的那些仍在运行,我只是无法创建任何新的。

I am using MS Access 2013 and have used the Setlocalvar to execute a user defined public VBA function in a Data Macro in the past. When I go into the system and attempt it now I get an error "Microsoft Access can't parse the expression". I thought there may something wrong with my definition of the expression, so I copied one that is working and put it on a different table and I get the same error message. Also, when I go to the tables that have existing Data Macros with the SetLocalvar settings that execute vba code they all have the exclamation mark to the left. The ones that are setup are still functioning, I just can not create any new ones.

有些更改不再允许将用户创建的公共函数分配给数据中的SetLocalVar宏?或者,有没有让我忘记工作的技巧?

Has something changed that no longer allows a user created public function to be assigned to the SetLocalVar in a Data Macro? Or, is there a trick to get it to work that I have forgotten about?

推荐答案

函数名称与模块名称不同是吗?此外,它应该被指定为函数名,包括括号,即使没有参数,也不应该在相等的运算符之前。
The function name isn't the same as a module name is it? Also, it should be specified as function name, including parenthesis even if no arguments and should not be preceded by the equal operator.


这篇关于无法使用setLocalVar在数据宏中设置公共函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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