Forum Discussion

drmayankrawat's avatar
drmayankrawat
Copper Contributor
May 23, 2023

Autonumber in MS Access jumped value from 27307 to 335570970

Hi, I am using MS access for managing my work related data. Autonumber in a field in a table jumped from  27307 to 335570970. Any reason why? is it dangerous for the data? Any method to reverse it or manage it?

1 Reply

  • George_Hepworth's avatar
    George_Hepworth
    Silver Contributor

    drmayankrawat 

    Is it dangerous? Not necessarily. However, we have no indication from this brief introduction of the reason it happened, so if "something dangerous" led to it, then that event could be considered dangerous. 


    For example, it could mean that a very large number of records were created and deleted. How and why could that have happened? You'd have to tell us what process could have run to do that.

     

    It could mean that a new record was inserted manually, using a query that inserted that much higher value in the VisitID field. It's an autonumber, which normally generates new values incrementally, as you expect. It is possible to override that and insert a different, and much higher value than would have been generated normally. Why would someone do that? Was it an accident? On purpose? It could be either.

     

    I would not worry about trying to wind it back at this point, no. While it would be possible to recreate the table and start the sequence over in a new autonumber field, it's simply not worth the effort, in my opinion. Nor would it be cost effective to try to reset those autonumbers manually, although you can do so

     

    The Long Integer datatype used by Autonumbers has a range of  -2,147,483,648 to 2,147,483,647 

    Your values begin at 335,570,970. That means you have over 1,800,000,000 more available positive values for new Autonumbers, not to mention the range of negative values (if I did the math correctly).

     

    It's probably a good idea to review all of the procedures you and other users might have followed which could have generated and deleted a huge number of records "accidentally". Also check out the possibility that someone was experimenting and "accidentally" inserted that new, large value manually.

     

     

Resources