I need a For Next loop to count the amount of times a instance occurs. I will warn helpers this is the first time I have tried to create one. What I am trying to accomplish is to have a counter keep track of defects. When I have a defect a person will click on a button that will call this loop. Update the defectcounter field in the TblPAQ3280Process table and insert the total time in the reworkLabor1 field if this is the first defect. Or the reworkLabor2 field if this is the second time... etc.
'For DefectCounter = 1 To B
'Update ReworkLabor1 Field with total time
'UPDATE TblPAQ3280Process SET TblPAQ3280Process.ReworkLabor&"DefectCounter" = [Enter Total Time of Rework]
'WHERE (((TblPAQ3280Process.ReworkLabor&"DefectCounter") Is Null) AND ((TblPAQ3280Process.SerialNumber)=[Enter Serial Number]));
'Update DefectCounter
'UPDATE TblPAQ3280Process SET TblPAQ3280Process.ReworkCount = "DefectCounter"
'WHERE (((TblPAQ3280Process.SerialNumber)=[Enter Serial Number]));
'
'Next DefectCounter
Any help would be appreciated.
'For DefectCounter = 1 To B
'Update ReworkLabor1 Field with total time
'UPDATE TblPAQ3280Process SET TblPAQ3280Process.ReworkLabor&"DefectCounter" = [Enter Total Time of Rework]
'WHERE (((TblPAQ3280Process.ReworkLabor&"DefectCounter") Is Null) AND ((TblPAQ3280Process.SerialNumber)=[Enter Serial Number]));
'Update DefectCounter
'UPDATE TblPAQ3280Process SET TblPAQ3280Process.ReworkCount = "DefectCounter"
'WHERE (((TblPAQ3280Process.SerialNumber)=[Enter Serial Number]));
'
'Next DefectCounter
Any help would be appreciated.