vba 在 Access 中使用子表单时“不使用 GoSub 返回”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11467746/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"Return without GoSub" when using subforms in Access
提问by Sinister Beard
Why do I get a
为什么我得到一个
"Return without GoSub"
“不带 GoSub 返回”
error when using subforms in Access 2007?
在 Access 2007 中使用子窗体时出错?
回答by Sinister Beard
This can occur when there is a Form_Load()
event in the subform, but not the main form. Try adding an empty Form_Load()
event to the main form.
当Form_Load()
子窗体中有事件而不是主窗体中有事件时,就会发生这种情况。尝试向empty Form_Load()
主窗体添加一个事件。
回答by Fionnuala
The most likely reason for this error is that the project has become corrupt. You should decompile, instructions are here: Debug a bad DLL calling convention error
此错误的最可能原因是项目已损坏。您应该反编译,说明在此处:调试错误的 DLL 调用约定错误
First, ensure that you have switched off Name Autocorrect: http://allenbrowne.com/bug-03.htmland ensure that you are not missing any references.
首先,确保您已关闭名称自动更正:http: //allenbrowne.com/bug-03.html并确保您没有遗漏任何引用。
回答by Ph. Riondel
I found a useful solution (in my case) for that same issue at http://www.fmsinc.com/microsoftaccess/performance/decompile.asp. It worked as a charm for me. HTH Phil
我在http://www.fmsinc.com/microsoftaccess/performance/decompile.asp找到了针对同一问题的有用解决方案(就我而言)。它对我来说是一种魅力。HTH菲尔
回答by c_rugby
Performing a decompile of the VBA code and recompiling followed by compacting my database resolved the issue for me.
对 VBA 代码执行反编译并重新编译,然后压缩我的数据库为我解决了这个问题。