本文介绍了如果打开多个表单,则在关闭数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在使用Access Runtime 2010供我的用户使用我的数据库。 frmHome是自动打开的表单的名称。如果我有frmLoans和frmHome打开并单击X关闭程序,我从frmLoans的'OnLoad事件中得到一个错误,说你输入的表达式对属性Form / Report有无效的引用。 (错误号2455)。当我关闭数据库时,为什么任何表单的OnLoad事件都在运行?我应该陷入错误2455并继续下一个错误吗?如果我关闭frmLoans(只留下frmHome打开)然后关闭数据库,那么我不会收到错误。我也没有在我的笔记本电脑上打开frmLoans时出现错误,上面有完整的Access 2010. 解决方案 I''m using Access Runtime 2010 for my users to use my database. frmHome is the name of the form that opens automatically. If I have frmLoans and frmHome open and click the X to close the program, I get an error from frmLoans'' OnLoad event saying that "You entered an expression that has an invalid reference to the property Form/Report." (error number 2455). Why is any form''s OnLoad event running when I''m closing the database? Should I just trap for error 2455 and resume next for just that error? If I close frmLoans (leaving just frmHome open) and then close the database, then I don''t get the error. I also don''t get the error with frmLoans open on my laptop that has the full Access 2010 on it. 解决方案 这篇关于如果打开多个表单,则在关闭数据库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-02 18:35