I have the code below and when it executes access display "Microsoft Access can't append all the records in the append query". Does anyone know how to eliminate this problem and display your own message. I also have the same problem when I have an sql query to add a record.
Guidance will be nice.
Dim sql2 As String
sql2 = "Update Contacts Set " _
& "CompanyName=" & Me.CompanyName.Value _
& "," _
& "TypeOfService=" & """" & Me.Combo5.Value & """" _
& "," _
& "InvoiceNumber=" & Me.InvoiceNumber.Value _
& "," _
& "ContactPerson=" & Me.ContactPerson.Value _
& "," _
& "Notes=" & Me.Notes.Value _
& "," _
& "DateOfService=" & "#" & Me.DateOfService & "#" _
& "," _
& "Amount=" & Me.Amount _
& " " _
& "Where SupplierID=" & Me.SupplierID.Value & ";"
varsql = sql2
DoCmd.RunSQL sql2, 0
Guidance will be nice.
Dim sql2 As String
sql2 = "Update Contacts Set " _
& "CompanyName=" & Me.CompanyName.Value _
& "," _
& "TypeOfService=" & """" & Me.Combo5.Value & """" _
& "," _
& "InvoiceNumber=" & Me.InvoiceNumber.Value _
& "," _
& "ContactPerson=" & Me.ContactPerson.Value _
& "," _
& "Notes=" & Me.Notes.Value _
& "," _
& "DateOfService=" & "#" & Me.DateOfService & "#" _
& "," _
& "Amount=" & Me.Amount _
& " " _
& "Where SupplierID=" & Me.SupplierID.Value & ";"
varsql = sql2
DoCmd.RunSQL sql2, 0