Private Sub确定_Click() On Error GoTo Err_确定_Click DoCmd.ApplyFilter , "密码 = Forms!更改密码!Text1" If IsNull([密码]) Then MsgBox ("密码不正确, 请再输入一次") Text1.SetFocus GoTo Exit_确定_Click: End If If Text3.Value < > Text2.Value Then Text3.SetFocus MsgBox ("请输入正确的确认密码") Else: 密码 = Text3.Value DoCmd.Close End If Exit_确定_Click: Exit Sub Err_确定_Click: MsgBox Err.Description Resume Exit_确定_Click End Sub