So after testing other items, I noticed that my iteration through the listbox is executing the correct number of times, but it is inserting the same values (row 0) of strSKU, intQty, strProcess for each iteration. Did I forget or omit something for these variables to update each time?
Code:
For i = 0 To Me.lstMultiItem.ListCount - 1
varItem = Me.lstMultiItem.ItemData(i) 'get next item in list data
Me.lstMultiItem = varItem 'set listbox to the item
strSKU = Me.lstMultiItem.Column(0)
intQty = Me.lstMultiItem.Column(1)
strProcess = Me.lstMultiItem.Column(2)
strRecordWOSQL = "INSERT INTO WOTracking (Process, ContractCo, Employee, SKU, SKUQty, OrderNo, Date_Time) VALUES ('" _
& strProcess & "','" & Me.cbxContractCo.Value & "','" & Me.cbxEmployee.Value & "','" & strSKU & "'," & intQty & ",'" & Me.tbxOrderNo.Value & "',#" & dtDateTime & "#)"
CurrentDb.Execute strRecordWOSQL
strUpdateQtySQL = "UPDATE Inventory SET Inventory.SaleableQty = Inventory.SaleableQty -" & intQty & " WHERE SKU = '" & strSKU & "';"
DoCmd.RunSQL strUpdateQtySQL
Next i
It seems to me like it should use the values from each row, but maybe I have forgotten something.