Dim a As Database
Dim b As Recordset
Private Sub Command1_Click()
Set b = a.OpenRecordset("select * from yh where kl ='" & Text1 & "'")
If b.EOF() Then
MsgBox ("口令错误")
Text1.SetFocus
Else
If b.Fields(1) = Text2 Then
Form2.Show
Unload Me
Else
MsgBox ("密码错误")
Text2.setfous
End If
End Sub
Private Sub Form_Load()
End Sub
參考答案:我知道~