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
|
|||
|
|||
Autonumber and record adding abounding
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 |
#2
|
|||
|
|||
Autonumber and record adding abounding
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? -- Steve Schapel, Microsoft Access MVP A.Niaki wrote: 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 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autonumber duplication between tables on the desktop and a PDA | Caimari | Database Design | 2 | March 23rd, 2006 12:15 PM |
PartNumber can be used as primary key | Kyle | New Users | 14 | March 1st, 2006 04:17 AM |
Gaps in Form "Record Number Boxes" | EricRod | New Users | 5 | March 5th, 2005 02:01 AM |
Prevent Blank Records being written. Need Help. | Robert Nusz @ DPS | Using Forms | 4 | December 29th, 2004 05:15 PM |
Autonumber | Ally H. | General Discussion | 7 | August 27th, 2004 04:51 PM |