Julia
07-24-2009, 01:52 AM
Hi all
I have a simple problem but its frustrating me because I cant figure out how to do it!
I have a list of data which I've already entered but I want the autonumber to continue from 2665.
Also, I want to then, on the form for it to open on say 2666 to be able to add a new record??
Please help!!
DCrake
07-24-2009, 01:54 AM
What is it starting at when you enter a new record?
gemma-the-husky
07-24-2009, 01:55 AM
you have to do an append query to add an item numbered 2664
then delete it
then the next number will be 2665
---------
but you cant/shouldnt assume you wont get gaps in an autonumber sequence - if you want to ensure there are no gaps, you need a different technique, which is normally to have a function that says
idnumber = highestnumber + 1
Julia
07-24-2009, 01:57 AM
Where would I put that function? I am newish to Access, I did it briefly a few years ago but forgot most things!
Its just starting at 0 at moment
gregorg
07-24-2009, 01:57 AM
I have tried to do this but to no avail. Can you create a blank table with the same fields and then generate 2665 records via VBA and then append the current table without the ID field ?
I don't know if you can do this.
Sorry
Julia
07-24-2009, 02:06 AM
is there something I can put in Default Value which will say when adding a new record, it goes onto next number
gemma-the-husky
07-24-2009, 03:26 AM
create an append query to add a record, and set the autonumber field to 2664 (or whatever), and any other data that might be required
run the append query
now open the table, and delete the recorc you just added
the autonumber will now continue for the next number.
-----------
i can only repeat - do not try to use an autonumber to manage anything that has ot maintain a sequence.