Anyone figure whats wrong with the following code:
Set dbs = CurrentDb
Set MyRs = dbs.OpenRecordset("tblMailMerge", dbOpenDynaset)
Do Until MyRs.EOF
With MyRs
.MoveFirst
intCust = ![CustID]
dbs.Execute "INSERT INTO ClientNotes (CustID, Date, NoteText) VALUES (10, 26/07/2002, 'MailMerge Letter Sent!'"
.MoveNext
End With
Loop
I'm getting a "Syntax Error in INSERT INTO query" error, yet the table and field names are all correct.
Ideas?
Set dbs = CurrentDb
Set MyRs = dbs.OpenRecordset("tblMailMerge", dbOpenDynaset)
Do Until MyRs.EOF
With MyRs
.MoveFirst
intCust = ![CustID]
dbs.Execute "INSERT INTO ClientNotes (CustID, Date, NoteText) VALUES (10, 26/07/2002, 'MailMerge Letter Sent!'"
.MoveNext
End With
Loop
I'm getting a "Syntax Error in INSERT INTO query" error, yet the table and field names are all correct.
Ideas?