谁看的懂下面的这段程序的,麻烦帮我解释下,ret.MoveFirst ret.Find "name ='" & Combo1.Text & "'" pt = ret("password") pa = pt If txtPassword = pa Then 'frmSplash.show LoginSucceeded = True Me.Hide frmMain.Show Unload Me Else MsgBox "
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 11:43:18
谁看的懂下面的这段程序的,麻烦帮我解释下,ret.MoveFirst ret.Find "name ='" & Combo1.Text & "'" pt = ret("password") pa = pt If txtPassword = pa Then 'frmSplash.show LoginSucceeded = True Me.Hide frmMain.Show Unload Me Else MsgBox "
谁看的懂下面的这段程序的,麻烦帮我解释下,
ret.MoveFirst ret.Find "name ='" & Combo1.Text & "'" pt = ret("password") pa = pt If txtPassword = pa Then 'frmSplash.show LoginSucceeded = True Me.Hide frmMain.Show Unload Me Else MsgBox "无效的密码,请重试!",,"登录" LOGINNO = LOGINNO + 1 If LOGINNO > 2 Then MsgBox "对不起,您不能使用该系统!",64,"登录失败" Unload Me Unload frmLogin Exit Sub End If txtPassword.SetFocus SendKeys "{Home}+{End}" End If End Sub Private Sub cmdCancel_Click() '设置全局变量为 false '不提示失败的登录 LoginSucceeded = False Me.Hide Unload Me End Sub
谁看的懂下面的这段程序的,麻烦帮我解释下,ret.MoveFirst ret.Find "name ='" & Combo1.Text & "'" pt = ret("password") pa = pt If txtPassword = pa Then 'frmSplash.show LoginSucceeded = True Me.Hide frmMain.Show Unload Me Else MsgBox "
ret.MoveFirst'游标指向数据表中第一条记录 ret.Find "name ='" & Combo1.Text & "'"'查找name = combo1内容的记录 pt = ret("password")'取对应的密码值 pa = pt If txtPassword = pa Then'判断密码是否是txtPassword的值 'frmSplash.show LoginSucceeded = True'是则成功标志置1 Me.Hide'隐藏当前登陆窗口 frmMain.Show'显示主窗体 Unload Me'卸载当前登陆窗口 Else MsgBox "无效的密码,请重试!",,"登录" LOGINNO = LOGINNO + 1'错误次数加1 If LOGINNO > 2 Then'累积2次 退出系统 MsgBox "对不起,您不能使用该系统!",64,"登录失败" Unload Me'卸载当前窗体 Unload frmLogin Exit Sub End If txtPassword.SetFocus'输入光标移至txtPassword中 方便输入 SendKeys "{Home}+{End}"'移到文本末尾 End If End Sub Private Sub cmdCancel_Click() '设置全局变量为 false '不提示失败的登录 LoginSucceeded = False Me.Hide Unload Me