R
Ray Todd Jr
Can someone please point out what I'm doing wrong here. I am getting error
3134 -Syntax Error in Insert Into Statement. This code is behind a form
using the after insert event.
By using the msgbox, I can confirm that the data is in fact correct,
however, I guess I obviously don't have the syntax correct.
Thanks,
Ray.
Dim strPropertyNote As String
Dim lngPropertyID As Long
Dim strSql As String
lngPropertyID = Me!txtPropertyID
strPropertyNote = "Property Added to Database on " & Now()
msgbox lngPropertyID & " " & strPropertyNote
strSql = "Insert into taPropertyNotes (PropertyID, Note) " & _
"values (" & lngPropertyID & ", '" & strPropertyNote & "')"
DoCmd.RunSQL strSql
3134 -Syntax Error in Insert Into Statement. This code is behind a form
using the after insert event.
By using the msgbox, I can confirm that the data is in fact correct,
however, I guess I obviously don't have the syntax correct.
Thanks,
Ray.
Dim strPropertyNote As String
Dim lngPropertyID As Long
Dim strSql As String
lngPropertyID = Me!txtPropertyID
strPropertyNote = "Property Added to Database on " & Now()
msgbox lngPropertyID & " " & strPropertyNote
strSql = "Insert into taPropertyNotes (PropertyID, Note) " & _
"values (" & lngPropertyID & ", '" & strPropertyNote & "')"
DoCmd.RunSQL strSql