|
我编了一个access系统,最后要做一个用户登录系统。但老是出现编译错误。请哪位大哥帮我瞧瞧哈~~~
Option Compare Database
Dim gdt As String, gdl As Integer, gdi As Integer
Private Sub Cmd确定_Click()
On Error GoTo Err_Cmd确定Click
If Nz([Txt密码])=Nz(dLookup("[密码]","用户密码表","[用户名]="&"'"&Combo用户名&"'"))_
AndMe.Combo用户名 <>""Then '验证用户和密码)
Me.TimerInterval = 0
Me.Visible = False
DoCmd.Close acForm, "登录背景窗体", acSaveYes
DoCmd.OpenForm "切换窗体", acNormal, , , acFormReadOnly, acWindowNormal
Else
MsgBox "用户名或者密码错误!请重试!", , "请重新输入"
Me.Combo用户名.SetFocus
Me.Txt密码 = ""
End If
Exit_Cmd确定_Click
Exit Sub
Err_Cmd确定_Click:
MsgBox Err.Description
Resume Exit_Cmd确定_Click
End Sub
[em06][em06][em06][em06] |
|