Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / April 2008

Tip: Looking for answers? Try searching our database.

auto number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
judith - 23 Apr 2008 17:37 GMT
I am priming up an auto number field in a table with a particular number and
then want the next records to be appended with the next numbers in the
sequence. If I prime back to a prior number the sequence seems to start wher
it left off.
eg. start at 1000 and the next 2 records are 1001 and 1002

If i then reset to 1000 the next 2 records go to 1003 and 1004

maybe I could remove the field and then reinstate it but how do I do this
using code?

Thanks
Marshall Barton - 23 Apr 2008 18:45 GMT
>I am priming up an auto number field in a table with a particular number and
>then want the next records to be appended with the next numbers in the
[quoted text clipped - 6 lines]
>maybe I could remove the field and then reinstate it but how do I do this
>using code?

You are using autonumber inappropriately.  An AutoNumber
field is only useful as a surrogate primary key where it's
only requirement is that it be unique.  As a surrogate pk,
the number has no meaning to anyone and therefore should not
be displayed where users can see it (because human nature
tries to make up a meaning such as this one comes after that
one or why is that number missing).

If you really need to have consequitively numbered records
(fairly unusual), then you will have to write code behind a
form to create them according to whatever rules you want to
follow.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.