Let's look at the example. Below, we have a form that allows the user to enter a record. The user will enter the Date, Description, and Value, and the form will automatically assign a sequential number to the Journal # field.

The user can control the assignment of the next number through the Codes table. In this table, there is a record for Journal Number that displays the last number assigned. The user can modify this value accordingly to start at whatever number is appropriate.

Then in Module1 in the Access database, there is a function called NewJournalNbr that returns the next number in the sequence and increments the Last_Nbr_Assigned field by 1.