I just realised it may not be what you are looking for. How is the table setup? Does each boxNumber only occur once in the table? If so, then yes, that thread could be used. (And I could help explain.) If not, then I'll need a little sample of the data.
Sorry for confusing ya. :o