Record Automatic Counter

  • Thread starter Thread starter Melissa
  • Start date Start date
M

Melissa

Please help. I have been working on inputting data from a
survey into forms. I have done 154 with no problems.
When I continue on to the 155th record, the ID (automatic
counter) skips to 156 while the counter on the bottom of
the form still says 155. How do I fix this?
 
Hello Melissa,

The ID field in your table (an AutoNumber) type should never be used to
'count' records; that is not its purpose. It is used only to guarantee that
a unique, system-generated number is assigned to a record. Once used, even
if a record is not saved, an AutoNumber is not reassigned.

On the other hand, the number at the bottom of your form, does show the
count of records in the recordset currently underlying your form.

hth,
 
The counter on the bottom shows the number of records. The "automatic
counter" that you are referring to as ID I assume is an autonumber field.
You should NOT rely on this to keep a consistent count of your records, it
is there only to provide a unique ID, not necessarily an unbroken,
sequential one. That said, compacting the database should start you off
again at one more than the current maximum number.

If you want a field with an unbroken, sequential number, you'll need to
create that field yourself. One question you'll have to answer though is, if
you've entered 150 records and decide to delete #101, what do you want to do
about the missing 101?
 
Try compacting the database. If a record was created, and then deleted, it's 'Autonumber' is still used up. As long as there are no other records using higher numbers, compacting it resets the counter

If you hav

1 Joh
2 Jac
3 Juli

and then delete 3, the next number used will still be 4, and there will be no 3 anywhere. But if you compact it, and do not have any records past 3, it will start the count from 3 again

It's actually alot simpler than how I've described it, sorry. I couldn't think of a better way.
 
Back
Top