Set rs = New ADODB.Recordset
txtSQL = "select * from pfm_user where usercard='" & txtUsername & "'"
Set rs = ExecuteSQLTWO(txtSQL, MsgText) '连接函数,具体可以自己写
If Not rs.EOF Then
If rs!userpwd = txtPassword Then '确认帐号
frmmain.show
unload me
exit sub
else
msgbox "密码错误!"
exit sub
endif
else
msgbox "无此用户!"
endif