|
昨天刚应用命令按钮时还运行正常的,今天就出现 “无效的过程调用或参数”对话框并弹出代码窗口了,截取窗口里hight ligth的一段,不知是否就是各位高手所说的错误代码,请指教菜鸟~~
1.“查找记录”按钮
Private Sub 查找记录_Click()
On Error GoTo Err_查找记录_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_查找记录_Click:
Exit Sub
Err_查找记录_Click:
MsgBox Err.Description
Resume Exit_查找记录_Click
End Sub
2.“刷新窗体”按钮
Private Sub 刷新窗体_Click()
On Error GoTo Err_刷新窗体_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit_刷新窗体_Click:
Exit Sub
Err_刷新窗体_Click:
MsgBox Err.Description
Resume Exit_刷新窗体_Click
End Sub
3.“关闭窗体”按钮
Private Sub 关闭窗体_Click()
On Error GoTo Err_关闭窗体_Click
DoCmd.Close
Exit_关闭窗体_Click:
Exit Sub
Err_关闭窗体_Click:
MsgBox Err.Description
Resume Exit_关闭窗体_Click
End Sub |
|