First of all, I'm going to assume that you need sequential numbering for something other than a foreign key. If it is a foreign key I have to ask what difference it makes?
Otherwise, an even more simple solution to sequential numbering (assuming you haven't gone back and deleted a number in the middle of a sequence) is:
NewNumber = DMax("number_field","table") + 1
Is that "as little code as possible"?
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group