In an Access Form with a sub form and a button I want to update at table with sevaral records with the following code.
In the subform there is a box name BUYQTY with a calculated value (Price * Discount), buy clicking the button each record should update with the correct value. How to implement the FOR...EACH statement in the following code? Because at this stage it update the first row value to all records.
Dim strSQL As String
strSQL = "UPDATE NewOrder SET NewOrder.BUYQTY = '" & Forms("OrderForm").Controls("OrdSub").Form.Controls("BUYQTY").Value & "'"