Now it is returning a value for the variable user into the verify table however perms is still returning an empty value.
VB Code:
Private Sub cmdLogin_Click() Dim mrs As Recordset Dim perms As String Dim permQuery As String Dim writeQuery As String user = txtUsername.Text writeQuery = "INSERT INTO verify(username, permissions) VALUES ('" & user & "', '" & perms & "')" permQuery = "SELECT permissions FROM users WHERE username = '" & user & "'" Set mrs = New Recordset mrs.Open permQuery, mySQL, adOpenStatic, adLockReadOnly If Not mrs.EOF Then perms = mrs.Fields("permissions").Value mrs.Close Set mrs = Nothing End If If UserCheck(txtUsername.Text, txtPassword.Text) = True Then mySQL.Execute writeQuery mySQL.Close Set mySQL = Nothing frmMenu.Show Unload Me Else MsgBox "You have no account in our database", vbCritical End If End Sub
Am I not doing something right with the recordset? It seems to keep returning a null value.




Reply With Quote