AutoNum Field

  • Thread starter Thread starter northstar
  • Start date Start date
N

northstar

My table has a RecordId field, data type "AutoNum." I made a form in design
view for the table. In the form the RecordID field number will not advance
when I add a new record. I need help in trouble shooting this problem. I work
in Access 2007.
 
Let's confirm we exactly what the problem is:

This is an Access (JET) table, and in table design view, this field's data
type shows as AutoNumber. Therefore in your form, when you move to a new
record is shows "(AutoNumber)" in the text box until you start adding a new
record. Then on the first keystroke as you start to enter the new record,
this text box changes to show the number, but it's the same number used by a
previous record. Even if you press Esc to undo the record, you still get a
previously-used number. (The same one again?)

If that's the case, try a compact/repair (Office Button | Manage.) If it's a
split database (i.e. the table is attached from another Access db), open the
back end (the database that actually contains the table), and compact/repair
it.

If that doesn't work, run the code in this article:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.html

Also make sure there is no Default Value for this text box. And if this is
actually a subform, make sure the AutoNumber field is not linking the field
to the main form (LinkChildFields property of the subform control.)
 
Back
Top