|
Private Sub Cmdok_Click()
On Error GoTo Err_Cmdok_Click
Dim mypasswords As String
mypassword = DLookup("passwords", "密码", "[username]=" & "'" & Me!Combouser & "'")
If IsNull(Me.Txtpass) = False And Me.Txtpass = mypassword Then
Me.Visible = False
DoCmd.Close acForm, "frm_load_back", acSaveYes
DoCmd.OpenForm "打开窗体面板", acNormal, , , acFormReadOnly, acWindowNormal
Else
MsgBox "用户名和密码错误", , "请重新输入"
Me.Txtpass.SetFocus
End If
Exit_Cmdok_Click:
Exit Sub
Err_Cmdok_Click:
MsgBox Err.Description
Resume Exit_Cmdok_Click
End Sub
问题在这里,加粗的地方
DoCmd.OpenForm "打开窗体面板", acNormal, , , acFormReadOnly, acWindowNormal |
|