通过主窗上的“X”关闭时始终提示找不到登陆窗体,报错2450
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Dim ASC
ASC = MsgBox("确定要退出系统吗?", vbQuestion + vbYesNo, "SQL server")
If ASC = vbYes Then
DoCmd.Quit acQuitSaveNone
ElseIf ASC = vbNo Then
Cancel = True
End If
End Sub