Don't use recordcount, it is inherently unstable. If you are using Access, you could set a field to be an AutoNumber, if you are using SQL Server you could declare the column in your table to have 'Identity' as a property. Also add a UNIQUE constraint.
Other DBEs have similar tools.
The only other approach is to have an external table that tracks IDs that have been used (whether or not the record still exists) and then add one to the last number used for each new record.
Cheers,
P.




Reply With Quote