|
一窗体每次修改后保存时速度奇慢,常等待2-3分钟,首次运行时,象死机一样,需等相当长时间,但第二次打开该窗体时,则速度正常,但如重新启动程序时,则重复上述现象。另在窗中加入一个打印命令按扭如下,但一执行,完成打印后,程序自动完全退出,或显示出错,准备关闭数据库,但如单纯运行打印窗体打印则正常.实在不知何解,请高手指点!
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim stDocName As String
strFilter = "电脑号=" & 电脑号
Set MyDB = CurrentDb
Set rety = MyDB.OpenRecordset("select 对象 from zl")
Select Case Nz(rety!对象)
Case "A"
stDocName = "报告A"
Case "B"
stDocName = "报告B"
Case "A_P"
stDocName = "报告A_P"
Case "B_P"
stDocName = "报告B_P"
Case "C"
stDocName = "报告C"
Case Else
stDocName = "报告A"
End Select
DoCmd.OpenReport stDocName, acNormal, , strFilter
|
|