I have a LostFocus sub routine that will generate a random ID number for adding a new record. When the user clicks the command button Save New it gives the user an error if this number already exist in the table. I did not use the auto random numner in ACCESS because users wanted a unique number that contained letters and number and the length could only be 7 characters long.
I need to figure out how to validate this random ID number at the time it is generated and so the user never receives this message and so they do not have to re-enter all the data they have just entered. I also need to go back into the sub routine and regenerate this number if it has been been duplicated.![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
I need to figure out how to validate this random ID number at the time it is generated and so the user never receives this message and so they do not have to re-enter all the data they have just entered. I also need to go back into the sub routine and regenerate this number if it has been been duplicated.
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)