Could anyone maybe explain why I would be getting this error. I have been using this db and made a couple of changes and now I get this error when I try to compile it.
Private Sub addtocustomer_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim strSQL As String
strSQL = "INSERT INTO tblOrders (ProductID, CustomerID)" & _
" VALUES(" & Chr(34) & ProductID & Chr(34) & ", " & Chr(34) & CustomerID & Chr(34) & ")"
CurrentDb.Execute (strSQL)
DoCmd.Close
End Sub
Private Sub addtocustomer_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim strSQL As String
strSQL = "INSERT INTO tblOrders (ProductID, CustomerID)" & _
" VALUES(" & Chr(34) & ProductID & Chr(34) & ", " & Chr(34) & CustomerID & Chr(34) & ")"
CurrentDb.Execute (strSQL)
DoCmd.Close
End Sub