Below is a line of code that trying to use...
DoCmd.RunSQL "Update [Deal Record] SET [Seller - Balance Paid]=" & ((([Seller - Invoice Amount] + [Seller - Swiss VAT]) / InvoiceAmountAfterVAT) * (Me.AlreadyPaid + Me.PaymentAmount)) & " WHERE [Seller - Invoice Reference]='" & Me.InvoiceNumber & "'"
This updates all the records where the [Seller - Invoice Reference] equals the value from the form Me.InvoiceNumber all ok. However... this updates the values for the [Seller - Balance Paid] with the values for [Seller - Invoice Amount] and [Seller - Swiss VAT] from the first record in that table and not the specific record it's updating.
I want the update to update the values based on the balance for that field for the record that it's updating and not the first record in the table.
Tried a few options and searched but not found the answer.
Thanks for any help!!
DoCmd.RunSQL "Update [Deal Record] SET [Seller - Balance Paid]=" & ((([Seller - Invoice Amount] + [Seller - Swiss VAT]) / InvoiceAmountAfterVAT) * (Me.AlreadyPaid + Me.PaymentAmount)) & " WHERE [Seller - Invoice Reference]='" & Me.InvoiceNumber & "'"
This updates all the records where the [Seller - Invoice Reference] equals the value from the form Me.InvoiceNumber all ok. However... this updates the values for the [Seller - Balance Paid] with the values for [Seller - Invoice Amount] and [Seller - Swiss VAT] from the first record in that table and not the specific record it's updating.
I want the update to update the values based on the balance for that field for the record that it's updating and not the first record in the table.
Tried a few options and searched but not found the answer.
Thanks for any help!!