I have a form that I am entering data in the following fields:
SKU | Qty | Description | UnitPrice | DiscountRate | CustomerID
The user enters the sku and Qty, the system checks for errors and returns the Description if values are found. The user then needs to enter a discount rate to be applied to each line.
The discount field is a combo box which holds 3 value lists: 10, 12.5 and 15.
This refers to the DiscountRate Field. I want to update all the values in that column with the value selected in the first row of that column.
So I set up an After_Update event in which an update query is run for the field, taking into consideration the first row value entered in the combobox.
Problem is when I navigate to the second record a error message is displayed:
Write Conflict
This record has been changed by another user since you started editing. If you save the record, you will overwrite the changes the other user made.
It then gives me an option to Save Record, Copy to Clipboard or Drop Changes.
How can I cancel that error message?
Is there a better way to implement this?
SKU | Qty | Description | UnitPrice | DiscountRate | CustomerID
The user enters the sku and Qty, the system checks for errors and returns the Description if values are found. The user then needs to enter a discount rate to be applied to each line.
The discount field is a combo box which holds 3 value lists: 10, 12.5 and 15.
This refers to the DiscountRate Field. I want to update all the values in that column with the value selected in the first row of that column.
So I set up an After_Update event in which an update query is run for the field, taking into consideration the first row value entered in the combobox.
Code:
Private Sub DiscountRate_AfterUpdate()
Dim sCriteria As String
sCriteria = "UPDATE tblSOPScratchPad " & _
"SET tblSOPScratchPad.DiscountRate =" & DiscountRate.Value & ";"
CurrentDb.Execute sCriteria
Me.DiscountRate.Requery
End Sub
Problem is when I navigate to the second record a error message is displayed:
Write Conflict
This record has been changed by another user since you started editing. If you save the record, you will overwrite the changes the other user made.
It then gives me an option to Save Record, Copy to Clipboard or Drop Changes.
How can I cancel that error message?
Is there a better way to implement this?