I have a sub-form on a main form. The sub-form can have one or more records. On the main form is a command button that when clicked I want to run a SQL statement that will update records in an unrelated table.
The VBA SQL code line is: (At least I hope this code is right)
strSQL = "UPDATE tblCMTinventory SET tblCMTinventory.Used = True " & vbCrLf & "WHERE (((tblCMTinventory.ID)=[Forms]![subfrmCMTworkOrderGroup1Details]![cboNewSN]));"
But what do I need to add to the code to make it loop through the records in the sub-form?