I was able to trap the error. Trust me when I tell you that the MonthName function was being passed "00" and I've provided the guilty serial number. You can see that for such a 10 digit serial, the 4th and 5th values (month) are zeros. Obviously, there can be no such month. When the error happens, no further code is executed because the error was not handled (obviously unforeseen). If code stops, all subsequent records in the table are not processed. I'm not saying there's nothing wrong with the other records; I leave that up to your expertise to decide. However, I'm suggesting the problem is due to the values where the month should be. Either the serial is wrong, or there are now exceptions to the pattern we started with. Using your example,
serial number 231009818. Third digit = 1, decade reference = 1980 : 1 > 0, manufacture year = 1981
which seems to fit the logic (I believe you are correct in your recollection of how it works - the notes spell it out & I could post them if need be). If that's the case, what would be the issue regarding the decade information? Not sure I'm following that part.
At this point, I have coded to trap a 00 month for either 8 or 9 digits, but I'm not understanding whether or not there is something else amiss. When I run it now, there are no errors and this is what's in the error table
SerialNum_FK |
Message |
021400270 |
Invalid Month |
39360527 |
Invalid Month |
660921743 |
Invalid Month |
231009818 |
Month digits are zeros |
8211002741 |
Not 8 or 9 chars |
The "month digits are zeros" message is part of the current fix.
BTW, I don't think I got an email re your post even though this response is about 2 hours later than yours.
Last edited by Micron; 04-02-2018 at 12:59 PM.
Reason: added info
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.