哈,一直都是上班的呀

已婚男人!没事请勿打扰·老婆格言:①不准對她耍酷 ②不准讓她吃醋 ③吵架我要讓步 ④揍我我要挺住⊙⊙
 2006-03-25 11:06
	    2006-03-25 11:06
   2006-03-25 11:12
	    2006-03-25 11:12
  我的是这样写的.已经测试过了
Private Sub cmdok_Click()
    Dim txtsql As String
    Dim rs1 As ADODB.Recordset
    
    If Len(atxtUserName) = 0 Then  '判断输入是否为空
            MsgBox "请输入用户名!", vbOKOnly + vbExclamation
            ElseIf Len(atxtPWD) = 0 Then
            MsgBox "请输入密码!", vbOKOnly + vbExclamation
    
    Else
            txtsql = "select * from 用户 where 用户名 = '" & Trim(atxtUserName.Text) & "'"  '检验输入用户名是否存在
            Set rs1 = ExecuteSQL(txtsql)
            If rs1.RecordCount = False Then
            MsgBox "该用户名不存在,请重新输入!", vbOKOnly + vbExclamation
            Exit Sub
            End If
            txtsql = "select * from 用户 where 密码 = '" & Trim(atxtPWD.Text) & "'"   '检验输入的密码是否正确
            Set rs1 = ExecuteSQL(txtsql)
            If rs1.RecordCount = 0 Then
            MsgBox "密码不正确,请重新输入!", vbOKOnly + vbExclamation
            Exit Sub
        Else
            Unload Me
            frmmain.Show
        
        End If
    End If
End Sub
 2006-03-26 00:17
	    2006-03-26 00:17