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 / Database Design / April 2006

Tip: Looking for answers? Try searching our database.

Autonumber and record adding abounding

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
A.Niaki - 29 Apr 2006 15:00 GMT
In a table, I need a field as a counter of each record, unique, sequential
and sorted by the sequence of data entry of each record; the field by
autonumber format is a good idea, BUT at the time of adding a new record if I
press ESC key (abounding of adding a new record), of course the new record
isn’t added but MyID will grow one number and next time when I add new
record, MyID has one number more than records quantity, as it is unwanted.
(id est: MyID is “abounding times of adding records”  more than records
quantities). How can I solve this problem at direct data entry of the table
or in a form?
Thanks
A.NIAKI
Steve Schapel - 29 Apr 2006 22:22 GMT
A. Niaki,

You can use a Number data type field, and in the data entry form set the
Default Value for this field to the equivalent of...
 DMax("[MyID]","NameOfYourTable")+1

But this won't help if you delete an existing record from the table, in
which case that record's ID number will be "missing" from the sequence,
and the highest ID number will again be greater than the number of records.

So if this will be a problem, I guess the main question here is "why?"
What is the purpose of this sequential counter?

Signature

Steve Schapel, Microsoft Access MVP

> In a table, I need a field as a counter of each record, unique, sequential
> and sorted by the sequence of data entry of each record; the field by
[quoted text clipped - 7 lines]
> Thanks
> A.NIAKI
 
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.