i'm having some problems figuring this one out and i'm needing someone to look at it and see what i'm not seeing. sometimes if I look at it to long I don't see the obvious. i'm using an unbound form with several combo boxes and text fields and then using an update button to update the data to the table but my string is getting a run-time error '3134' syntax error in insert into statement. I have been researching this all afternoon and most fixes refer to using reserved words but I don't see any. please look at this and see what you see.
Code:
Private Sub cmdsave_Click()
Dim strsql As String
strsql = " INSERT INTO RequestT (LocID, DeptID, SystemID, AssetID, ComponentID, HealthID, WorkID, Summary, Desc, PriorityID, RequestDate, CriticalID) " & _
"VALUES (" & Me.cboloc.Value & ",'" & Me.cbodept.Value & "','" & Me.cbosystem.Value & "','" & Me.cboasset.Value & "','" & Me.cbocomp.Value & "','" & Me.cbohealth.Value & "','" & Me.cbowork.Value & _
"','" & Me.txtsummary.Value & "','" & Me.txtdesc.Value & "','" & Me.cbopriority.Value & "','" & Me.txtdate.Value & "','" & Me.txtcrit.Value & "'); "
Debug.Print (strsql)
CurrentDb.Execute (strsql)
End Sub
the debug.print is getting all the values correctly. any thoughts?