Hello Everyone,
I am new to Access and the forums, and for the last day or so I have been constantly frustrated with VBA and the Insert Into function. I am attempting to take data from a form, and insert it into a table. I have simplified and simplified again to try and debug. I am currently at only one entry on the form being entered into the table. I am stumped, here is the problem:
When I enter a number in the "Operator_Name" field, the program works exactly as it should. When I enter a letter or alphanumeric combination, it returns run time error 3464 (Data type mismatch in criteria expression." I have tried many combinations of parentheses, brackets, double quotes, and single quotes. I have run out of patience and I think I am beginning to go crazy! Let me know if I can provide more information, here is my code:
Private Sub Submit_Click()
Dim strInsert As String
Dim txtOperator As String
Dim Operator_Name As String
CurrentDb.Execute "INSERT INTO [Driver_Bolster_E2SC_IPPaint_Test](Operator_Name) VALUES ('" & Me.txtOperator_Name & "')"
Debug.Print strInsert
End Sub
Thank you for any help,
Alex.