Searched the forum but didn't find anything specifically on point. Could sure use some help.
I have inherited a table called tblLog with over 5000 entries and growing. It has the following columns:
My predecessor never used the DaysToProcess column but now management would like that information. (Already updated the input form to automatically calculate the DaysToProcess and update the table on all future entries.) It would be too time consuming to click through all 5000 entries and do the manual calculation.
I would like to come up with a procedure in a module that will iterate through each entry in the table, subtract the CompletedDate from the IntakeDate and update the DaysToProcess field, then go on to the next entry. This pseudocode is more or less what I'm trying to do:
Private Sub FixThatIdiotsMistake()
Any suggestions or guidance would be greatly appreciated.
Thanks,
DiverGuy
I have inherited a table called tblLog with over 5000 entries and growing. It has the following columns:
ID
IntakeDate
CompletedDate
DaysToProcess
IntakeDate
CompletedDate
DaysToProcess
My predecessor never used the DaysToProcess column but now management would like that information. (Already updated the input form to automatically calculate the DaysToProcess and update the table on all future entries.) It would be too time consuming to click through all 5000 entries and do the manual calculation.
I would like to come up with a procedure in a module that will iterate through each entry in the table, subtract the CompletedDate from the IntakeDate and update the DaysToProcess field, then go on to the next entry. This pseudocode is more or less what I'm trying to do:
Private Sub FixThatIdiotsMistake()
Dim x as Integer
For x = 1 to EndOfTable
End SubFor x = 1 to EndOfTable
DaysToProcess.Value = CompletedDate.Value - IntakeDate.Value
NextAny suggestions or guidance would be greatly appreciated.
Thanks,
DiverGuy