I am running Ms Access VBA Sql code to append selected items from listbox to a temp table. My code is working just fine however, when I pick certain items from listbox it returns the following error.
Runtime error '3075': Syntax error (missing operator) in query expression "Bachelor Of Technology (B.Tech/B.E) (Computers) Institue : Maeer's Mit College of Engineering'.
I think it has something to do with the special characters included or something.
Private Sub Command101_Click()
DoCmd.SetWarnings False
code1 = "INSERT INTO tmp_education_list ( education ) "
If Me.Frame97 = 1 Then
For i = 0 To Me.List96.ListCount - 1
sqlstr = code1 + "VALUES('" & Me.List96.ItemData(i) & "');"
DoCmd.RunSQL sqlstr
Next I
End If
DoCmd.Requery "Text135"
DoCmd.SetWarnings True
End Sub
What am I missing here?