Resetting Record Number Field to start @ 1

  • Thread starter Thread starter Kev McIntyre
  • Start date Start date
K

Kev McIntyre

I have a Make Table Query that creates an additional Field "RecordNumb".
When run, the RecordNumb commences at 1 through to 12 (12 records in the
Table)
When run again, I need the RecordNumb to commence at 1 again rather than
commence at 13 as it does.

Any help would be greatly appreciated.
 
Thanks for your input Allen.......

The RecordNumb field is a Text field (Not Auto Number)
A Query inserts the - RecordNumb:DoesIncriment([Name])
First time run it works fine but second time, the incriment continues.

If I exit the Database and re-enter and run the Query the starting
RecordNumb = 1 which is the way I want it to work, but I do not want to exit
the DB each time to get it to work correctly.

Does this explain it better? and does it alter your response ?
 
DoesIncriment() is not a built-in function.

Sounds like someone has written a custom function. If it's not behaving the
way you want, you will need to get them to change it for you.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Kev McIntyre said:
Thanks for your input Allen.......

The RecordNumb field is a Text field (Not Auto Number)
A Query inserts the - RecordNumb:DoesIncriment([Name])
First time run it works fine but second time, the incriment continues.

If I exit the Database and re-enter and run the Query the starting
RecordNumb = 1 which is the way I want it to work, but I do not want to
exit
the DB each time to get it to work correctly.

Does this explain it better? and does it alter your response ?


Allen Browne said:
Access will reset the AutoNumber if you delete the existing records and
then
compact the database.

If you want to do it programmatically, this code will reset the Seed of
the
AutoNumber:
http://allenbrowne.com/func-ADOX.html#ResetSeed
 
Back
Top