“Return without GoSub” when using subforms in Access

无人久伴 提交于 2019-12-13 12:24:27

问题


Why do I get a

"Return without GoSub"

error when using subforms in Access 2007?


回答1:


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.




回答2:


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

First, ensure that you have switched off Name Autocorrect: http://allenbrowne.com/bug-03.html and ensure that you are not missing any references.




回答3:


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




回答4:


Performing a decompile of the VBA code and recompiling followed by compacting my database resolved the issue for me.




回答5:


I had something similar (not specifically in VBA, but with using a form to update a subform). I just added a "StopAllMacros" step at the end of the screen updating object and it seemed to work.



来源:https://stackoverflow.com/questions/11467746/return-without-gosub-when-using-subforms-in-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!