If bothersome, I would do one or more of the following
- compact/repair
- delete the autonumber PK field, save and close table, reopen in design and reinstate the field
- make sure AN field is set to increment, not random
- make sure the AN field is not being used in a child/master link
notwithstanding that AN fields are only meant to be unique and have no assurance that they will all be positive or sequential. In addition, unless the assignment specifies that they must be sequential, why worry about the situation as described? If the assignment creator has stipulated that AN's should increment and be sequential, there is a gap in his/her knowledge about AN's.
That is all predicated on the assumption that Access tables are involved since that's what this forum is about, and OP indicates version 2016.
Also -
- would not use .Text property for form fields if they are bound
- and wonder if there is any relationship between the listbox (if that's what it is) and the control for the autonumber ID (e.g. is ID linked to any list column?)
- would probably use requery, not refresh
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.