访问在加载用户表单时崩溃 [英] Access crashed on loading userform

查看:58
本文介绍了访问在加载用户表单时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了我的应用程序,但是出现了一个问题,我无法理解-我的应用程序还没有autoexec,所以我打开访问权限并双击我的用户窗体以打开它.

I have built my application but a problem has arisen that I cant get my head around - My application has no autoexec yet so I open access and double click on my userform to open it.

打开用户窗体时Access崩溃并关闭

On opening the userform Access crashes and closes

但是,如果我先将用户窗体放在设计视图中,然后在窗体视图中打开它,则效果很好.

However, if I first put the userform in design view, then open the form in form view it works fine.

怎么可能?

它不能是Form Load编码,否则当从设计视图转到表单视图时仍然会崩溃.

It cant be the Form Load coding or it would still crash when going from design view to form view.

在以下情况下,我将包括我的表单加载代码:

I will include my form load coding in case:

Me.LastImport.Value = DLast("LastImport", "tbl_Import_Export_logger")
Me.Text42.Value = Date
Me.Text44.Value = Date - Weekday(Date, 3)

'Compliance Reporting
Me.Text68 = DCount("[CustomerAccountNumber]", "Q_HealthChecksOverdue") 'Overdue Health Checks
Me.Text76 = DCount("[CustomerAccountNumber]", "Q_HealthChecksdue") ' Due Health Checks
Me.Text74 = DCount("[CustomerAccountNumber]", "Q_HealthChecksCompleted") ' Completed Health Checks
Me.Text72 = DCount("[LettersDueStatus]", "Q_LettersSent_Query") 'Count number of letters sent

推荐答案

感谢您的所有答复.我并没有最终测试大家提到的建议.

Thank you for all the replies. I didn't end up testing the suggestions you all mentioned.

就我而言,在VB中我运行了调试程序,并在代码中突出显示了2个问题,因此我对它们进行了排序,现在可以正常运行了.

In my case, in VB I ran debug and it highlighted 2 issues in my code so I sorted them, now it runs fine.

谢谢大家

这篇关于访问在加载用户表单时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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