|
Dim rst As New ADODB.Recordset
Dim strsql As String
strsql = "select 用户名,密码 from 用户名""" 条件在哪里?后面应该加where
' where 用户名='"&控件名 &"' and 密码='"& 控件名 &"'
rst.Open strsql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If Trim(Me.Combo13) = Trim(rst.Fields(0)) And Trim(Me.Text2) = Trim(rst.Fields(1)) Then
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(20999) & ChrW(25442) & ChrW(-26782) & ChrW(26495)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "登陆失败,请重新登陆"
Me.Combo13.SetFocus
End If
End Sub
|
|