Hello Moises,
Looks like your way would work fine, until someone append blanks the table outside of your code. Then at some point you'd have problems with unique primary key violations. My way, the number generation is part of the table.
HTH
Tony
Skill comes from Diligence