If the field is being stored in a database table you can have the table field automatically increment (in SQL Server it is an IDENTITY field, and in ACCESS it is an AUTONUMBER field) the field number and then use the @@IDENTITY (in SQL Server) to retirieve it after the INSERT.
If it is just for use in your code you will need to store the last number in a file or database table so you know the last number used. Then read the number and increment it by the interval you require.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.