A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Autonumber and record adding abounding



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2006, 03:00 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default 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  
Old April 29th, 2006, 10:22 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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 01:15 PM
PartNumber can be used as primary key Kyle New Users 14 March 1st, 2006 05:17 AM
Gaps in Form "Record Number Boxes" EricRod New Users 5 March 5th, 2005 03:01 AM
Prevent Blank Records being written. Need Help. Robert Nusz @ DPS Using Forms 4 December 29th, 2004 06:15 PM
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM


All times are GMT +1. The time now is 06:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.