Clive Beaton
asked on
Problem with auto number field inserting a record
I have a table with an auto number as the primary key. The first ID in the table is 5069.
I have a vba function to add a new record to the table, using addnew and update. The function does not include a value for the ID field.
When I run the function, the ID of the appended record is 50.
How do I make the ID the next sequential number in the table?
Thanks in advance.
I have a vba function to add a new record to the table, using addnew and update. The function does not include a value for the ID field.
When I run the function, the ID of the appended record is 50.
How do I make the ID the next sequential number in the table?
Thanks in advance.
ASKER
The auto number is the ID I'm referring to.
If I look at the table in ID sequence, the first record ID is 50, second record ID 5069, and the rest of the records follow on sequentially from 5069.
If I look at the table in ID sequence, the first record ID is 50, second record ID 5069, and the rest of the records follow on sequentially from 5069.
Did you delete a bunch of records at some point ?
ASKER
Yes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect, thank you. Why didn't I think of that???
Sorry ... I had to leave work. hnasr beat me to the solution.
ASKER
Sorry about that.
And if so, as you saying it goes from 5069 to 50 ?
If So. what is before 5069 ? Are they sequential ?
mx