Just ouit of curiosity. Why do you use DataControl to verify user?
You are already using ADO in your program.
I suggest to you this way. Make separate fields UserName and UserPassword within User table, then just use this
VB Code:
Function FindUser(sUserName As String, sUserPW As String) As Boolean Dim rs, strSQL, conn conn="Provider=Microsoft.Jet.OLEDB.3.51;" & "Data Source=" & App.Path & ".\mydata.mdb" strSQL="SELECT * FROM [User] WHERE [UserName]='" & sUserName & "' AND UserPAssword='" & sUserPW & "'" Set rs = CreateObject("ADODB.Recordset") rs.open strSql, conn FindUser = Not rs.EOF rs.Close Set rs = Nothing End Function




Reply With Quote