|
以下为用户注册窗体的确定按钮的单击事件代码,单击确定按钮即可打开主控面板窗体。请教是哪句代码打开主控面板。
Private Sub Cmd确定_Click()
On Error GoTo Err_Cmd确定_Click
If Nz([Txt密码]) = Nz(DLookup("[密码]", "系统用户密码表", "[用户名]=" & "'" & Combo用户名 & "'")) _
And Me.Combo用户名 <> "" Then '验证用户和密码)
NowUser = Me.Combo用户名
DoCmd.Close
DoCmd.Close acForm, "登陆背景", acSaveYes
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(20027) & ChrW(25511) & ChrW(-26782) & ChrW(26495)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "用户名和密码错误", , "请重新输入"
Me.Combo用户名.SetFocus
End If
Exit_Cmd确定_Click:
Exit Sub
Err_Cmd确定_Click:
MsgBox Err.Description
Resume Exit_Cmd确定_Click
End Sub
|
|