Hi,
I have created a query to update stock levels when a worksheet has been completed. I can run the query and click on each individual record in the subform and the stock levels update correctly. What I was trying to do was to loop through all the records in the subform and run the query each time. The worksheet form has all the details of the work carried out with a subform with all the parts used.
Not sure if this is the best way to achieve this but would happily accept any advice.
The code I have been using is as follows:
Code:
Set rst = Forms!frmWorksheet.tblPartsUsedSubform.Form.RecordsetClone
Do Until rst.EOF
DoCmd.OpenQuery "qryStockWorkUpdate"
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
.