Found this code @ http://allenbrowne.com/ser-57.html
I have a form with subform for entering data and set up a CmdDupe button
I get the error message : Syntax error in Insert into
Code:
'Duplicate the related records: append query.
If Me.[10SubformEquipment].Form.RecordsetClone.RecordCount > 0 Then
strSql = "INSERT INTO [10SubformEquipment] (TicketID, EquipmentID, Note) " & _
"SELECT " & lngID & " As TicketID, EquipmentID, Note " & _
"FROM [10SubformEquipment] WHERE TicketID = " & Me.TicketID & ";"
DBEngine(0)(0).Execute strSql, dbFailOnError
and the line
Code:
DBEngine(0)(0).Execute strSql, dbFailOnError
is highlighted...
Can anyone see what is wrong?