Voltron
Defender of the universe
- Local time
- Today, 05:36
- Joined
- Jul 9, 2009
- Messages
- 77
I have 2 unbound controls. 1 combo box and 1 textbox. The combo box is comboID and the textbox is txtPopulate. I want to send this information to 2 different fields in a table in the current database.
This is the code that I have and for some reason I keep getting an "end of statement expected" error and Access highlights the me. before the txtPopulate part.
Private Sub btnSubmit_Click()
Dim SQL As String
sql = "insert into Tbl_Analyst (Analyst_User_ID, Analyst_First_Name) values ('" & me.comboID & "','" me.txtPopulate & "')"
CurrentDb.Execute (SQL)
End Sub
What am I doing wrong?
Also, when I enter in information in the controls and hit the Submit button I get a syntax error.
This is the code that I have and for some reason I keep getting an "end of statement expected" error and Access highlights the me. before the txtPopulate part.
Private Sub btnSubmit_Click()
Dim SQL As String
sql = "insert into Tbl_Analyst (Analyst_User_ID, Analyst_First_Name) values ('" & me.comboID & "','" me.txtPopulate & "')"
CurrentDb.Execute (SQL)
End Sub
What am I doing wrong?
Also, when I enter in information in the controls and hit the Submit button I get a syntax error.