auto number without using auto number

  • Thread starter Thread starter VK
  • Start date Start date

VK

New member
Local time
Today, 20:02
Joined
Feb 18, 2002
Messages
9
Hi all, is there a way that I can set up a field so that I can have it automatically numbered whenever a new record is added? I know about the auto number, but I don't want to lose any sequential numbers if for some reason a record is deleted before it is saved....

I was thinking to avoid this, when a new record is added, 1 would be added to the last number entered. Not sure how to make this happen.

Any help is very much appreciated. Thank you.
 
How would you keep the numbering sequence if a record was deleted that was issued days ago? e.g. you're on reord 100 now but you delete No. 16 - you would still have a gap in the sequence

Colin
 
What I do is have the autonumber as the ID for the table and have another sequential number as Invoice No if the record is to be saved.

You can use DMax to lookup the last number used and then +1 to give you the new number.
 
Thanks for the response. I'll try out your suggestion, John.

Colin, hopefully no one would delete any records days later....(it would have to be explained somehow for accounting purposes)...also, hopefully, there will be a daily backup....as far as I know, with autonumber, if you are in the middle of entering a record and then delete it (if, say, a mistake is made in the data entry or something) instead of reusing the same number when you go back to add the record again, it moves up to the next sequential number....I wanted to avoid that.
smile.gif


Thanks again for the help.
 
Why don't you set the form not to allow deletions? Problem avoided
smile.gif
 
I knew I could lock the form from editing, can I set it to allow new records to be added but not to be able to delete previous records?
 
on the forms property sheet, set the property AllowDeletions to No
 
Well, that was simple enough.
smile.gif
Thanks!
 

Users who are viewing this thread

Back
Top Bottom