Here's what I'm trying to do, have a SQL statement Insert info into a table, and then verify that info from what someone typed in from a text box. My problem is coming in at "If LocalUser.Password =......" It tells me an object is needed. What's the syntax to type in to pull up this record in this manner? Thanks for any help!
Dim SQL As String
Dim SQL2 As String
SQL = "INSERT INTO LocalUser (Password) " & _
" SELECT Password " & _
" FROM Employee " & _
" WHERE [UserID] = [Forms]![FoLogin]![txtUserID]"
DoCmd.RunSQL SQL
If LocalUser.Password = [Forms]![FoLogin]![txtPassword] Then
Dim SQL As String
Dim SQL2 As String
SQL = "INSERT INTO LocalUser (Password) " & _
" SELECT Password " & _
" FROM Employee " & _
" WHERE [UserID] = [Forms]![FoLogin]![txtUserID]"
DoCmd.RunSQL SQL
If LocalUser.Password = [Forms]![FoLogin]![txtPassword] Then