First of all, sorry for posting this to two different forums, but I wasn't sure of the best one to post to.
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
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