If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Primary key numbers dissapeared
My database has juest been set up and the numbering (set to autonumber) has
jumped from record no 236 - 3665 As far as i am aware nobody has deleted records and the database has not been tampered with. can anyone please explain why this would happen -- Thank you for reading my post. Hopefully you can answer my querie |
#2
|
|||
|
|||
Primary key numbers dissapeared
Try a compact/repair.
If that doesn't work, you probably need to apply a service pack to your version of Office and also to the JET 4 database engine. Get both from: http://support.microsoft.com/sp You can programmatically set the Seed of the AutoNumber. Here's some code the will run through all your tables and check them: http://allenbrowne.com/ser-40.html Note that if your database is split (with attached tables), you need to run this on the back end (the database that actually has the tables in it.) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Shazza" wrote in message ... My database has juest been set up and the numbering (set to autonumber) has jumped from record no 236 - 3665 As far as i am aware nobody has deleted records and the database has not been tampered with. can anyone please explain why this would happen -- Thank you for reading my post. Hopefully you can answer my querie |
#3
|
|||
|
|||
Primary key numbers dissapeared
hi,
Shazza wrote: My database has juest been set up and the numbering (set to autonumber) has jumped from record no 236 - 3665 As far as i am aware nobody has deleted records and the database has not been tampered with. can anyone please explain why this would happen An incrementing autonumber in Access/Jet is not necessarily without gaps. The incrementing autonumber only gives you a greater number than the last one (as a unsigned integer, but as they are always signed a flip to negatives will happen at 2^31-1). If you need a running number for any purposes you must generate it by your self, e.g. Private Sub Form_BeforeUpdate(Cancel As Integer) Me![runningNumber] = Nz(DMax("runningNumber", "yourTable"), 0) + 1 End Sub mfG -- stefan -- |
Thread Tools | |
Display Modes | |
|
|