I keep getting a Syntax error on this code and I have looked at it till my eyes wore out! Can anyone help??
Code:
Private Sub Transfer_WN_Books_Click()
Dim strSQL As String
strSQL = ""
strSQL = strSQL & " INSERT INTO Books"
strSQL = strSQL & " ( Title, Author, field222, field2, Notes, Amazon )"
strSQL = strSQL & " Values"
strSQL = strSQL & " ' " & Me.Title & " ', " & Me.AuthorID & " , ' " & Me.Rating & " ',"
strSQL = strSQL & " ' " & Me.Cover & " ',' " & Me.Notes & " ', ' " & Me.amazon & " ')"
Debug.Print strSQL
CurrentDb.Execute strSQL, dbFailOnError
End Sub
Thank you.
Code:
Private Sub Transfer_WN_Books_Click()
Dim strSQL As String
strSQL = ""
strSQL = strSQL & " INSERT INTO Books"
strSQL = strSQL & " ( Title, Author, field222, field2, Notes, Amazon )"
strSQL = strSQL & " Values"
strSQL = strSQL & " ' " & Me.Title & " ', " & Me.AuthorID & " , ' " & Me.Rating & " ',"
strSQL = strSQL & " ' " & Me.Cover & " ',' " & Me.Notes & " ', ' " & Me.amazon & " ')"
Debug.Print strSQL
CurrentDb.Execute strSQL, dbFailOnError
End Sub
Thank you.