AutoNumber Generated in case of Record not Entered.

asdaqamin

Asdaq Amin
Local time
Today, 20:34
Joined
Nov 29, 2005
Messages
33
I m using autonumber in my ID field.My other table fields are mandatory.
There is no problem when I enetered Record completely.
Now if I have 20 records. automuber is also 20. Now I want to eneter new record. 21 autonumber generated. But I have not completed the form/table.or I didnt want now that record.So I didnt save it.

But next time I come autonumber 22 is generated for my new record.
Now I have 1,2,3,......19,20,22,23....

here 21 has lost.Now is there any option to recover or restict that without completing the full table if the record had not saved autonumber again generated.
 
No not really...
Why would you want to? An auto number should be a meaningless key value.
If you are giving a meaning to that number, then your in trouble. and you should change that, not the meaninglessness of the autonumber.

If you desire a meaningfull number you should generate it yourself....
 
Yar(Friend) thats not a proper answer for my question.
I my database I need autonumber type needed as a primary key.

I want any solution. I am begineer. You guys didnt any solution for this.
Please resolve this problem.
 
You may not have gotten the answer you wanted, but you did get a proper answer. As the Mailman noted, autonumber fields can skip numbers in the situation you describe. They should not be used as a field that is visible to the user and can't skip numbers. You can keep the autonumber field as the autonumber key, but create another one visible to the user and increment that field yourself.

Edit: Sorry Pat, your response wasn't there when I started typing.
 
asdaqamin said:
Yar(Friend) thats not a proper answer for my question.
I my database I need autonumber type needed as a primary key.

I want any solution. I am begineer. You guys didnt any solution for this.
Please resolve this problem.
Vriendelijke vriend *Friendly friend*

Besides what is allready stated, (thanks for the backup guys ;) ) I would like to add that getting the answer thrown to you is not the way to go if you want to grow.

If you are a beginner and want to grow, learn and to think for yourself then ask questions here. If you want ready made answers for all your problems hire any of the proffesionals here and they will do it for you.

Seasons greatings from Amsterdam

The Mailman
 

Users who are viewing this thread

Back
Top Bottom