; If mrc.EOF = True Then
CmbUser.SetFocus
Else
If Trim(mrc!密码) = Trim(Txtpassword.Text) Then
LoginUser = mrc!登录姓名
Permission = mrc!权限
If Check1.Value = 1 Then
r = WritePrivateProfileString("用户信息", "姓名", CmbUser.Text, App.Path + "\电子教务系统.ini")
s = WritePrivateProfileString("用户信息", "密码", Txtpassword.Text, App.Path + "\电子教务系统.ini")
If r <> 1 Or s <> 1 Then
MsgBox "写基本信息出错!", 48, App.Title
End If
Else
r = WritePrivateProfileString("用户信息", "姓名", "", App.Path + "\电子教务系统.ini")
s = WritePrivateProfileString("用户信息", "密码", "", App.Path + "\电子教务系统.ini")
End If
mrc.Close
Me.Hide
Exit Sub
Else
Txtpassword.SetFocus
Txtpassword.Text = ""
End If
End If
End If
miCount = miCount + 1
MsgBox "登录错误,你还有" & 3 - miCount & "次机会!", vbOKOnly + vbExclamation, "警告"
If miCount = 3 Then
Me.Hide
End If