Access 2010 - 宏转换为VBA,它存储在哪里? [英] Access 2010 - Macro Converted to VBA, Where Is It Stored?

查看:356
本文介绍了Access 2010 - 宏转换为VBA,它存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将一些全局宏转换为VBA,然后运行一个Form。 我已经这样做了好几年了。 在最近的假期回归中,我发现我的VBA转换在默认位置无法自动显示。 我知道这是因为
我需要更改宏。 我在设计视图中打开了宏,进行了更改,保存然后转换它。 我可以看到新转换的宏。 它的名称是我常用宏的名称,最后添加了"1"。 这很正常。 
VBA窗格通常会打开,我可以看到普通名称下的原始宏和普通名称下新转换的宏加上最后的"1"。 这次我只能看到新转换的宏。 我找不到原来的
宏。 我的常规例程是删除旧的普通名称宏,然后重新运行转换,这样我就得到了一个同名的VBA文件。 我这次不能这样做。 相反,我进入我的表单将事件更改为新的
转换宏的名称并保存。 当我运行表单时出现错误:

I converted some global macros to VBA and I run through a Form.  I've been doing this for several years.  On a recent return from vacation I found that my VBA converts were not automatically visible in the default location.  I know this because I needed to change a macro.  I opened the macro in design view, made my change, saved it then converted it.  I can see the newly converted macro.  It's name is the name of my usual macro with the addition of '1' at the end.  This is normal.  The VBA pane would normally open up and I can see both the original macro under the plain name and the newly converted macro under the plain name plus '1' at the end.  This time I can only see the newly converted macro.  I can't find the original macro.  My regular routine would be to delete my old plain name macro and then rerun the conversion so I get a VBA file with the same name.  I can't do that this time.  Instead I went into my form to change the Event to the name of the newly converted macro and save it.  When I ran the form I got an error:

(我无法在此处复制错误消息。 它说'作为事件属性设置输入的表达式On Click生成了以下错误:您输入的表达式具有Microsoft Access无法找到的函数名称。)

(I couldn't copy the error message here.  It says 'The expression On Click you entered as the event property setting produced the following error: The expression you entered has a function name that Microsoft Access can't find.)

我认为Access无法找到新转换的文件,我找不到旧文件。 或模块。

I think Access can't find the newly converted file and I can't find the old file.  Or module.

有关如何解决此问题的任何想法?

Any ideas on how to remedy this?

推荐答案

您好Cindy Sweeny,

在我的测试中,转换宏会为每次转换生成不同的模块,例如转换宏测试,转换宏测试1,转换宏 - Test2。

如何通过表单运行宏?在我的测试中,我尝试通过按钮单击事件来运行宏。但是,我只能为on click事件设置宏,而不能为on click事件设置VBA代码。因此,无论我将
宏转换为VBA代码,它仍然可以调用宏。

我是否误解了什么?您可以共享一个简单的数据库文件,以便我们可以尝试重现您的问题吗?您可以通过OneDrive共享文件并在此处输入链接。

此外,您访问的内部版本号是多少?您最近是否更新了访问权限?如果有,您可以尝试卸载更新。

最好的问候,

Terry
Hi Cindy Sweeny,
In my test, convert macro would generate different modules for each converting, such as Converted Macro-Test,Converted Macro-Test1,Converted Macro-Test2.
How do you run the macro through a Form? In my test, I tried to run the macro via a button click event. However, I could only set the macro for the on click event but not the VBA code for the on click event. So it could still call the macro no matter I convert the macro to VBA code.
Did i misunderstand anything? Could you share a simply database file so we could try to reproduce your issue? You could share file via OneDrive and put link here.
Besides, what's the build number of your access? Did you update the access recently? If did, you could try to uninstall the update.
Best Regards,
Terry


这篇关于Access 2010 - 宏转换为VBA,它存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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