Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autonumber is duplicating - Why?

Status
Not open for further replies.

mguwc

Technical User
Mar 16, 2004
74
US
Hi - I am having a problem. I have created a form called Child Data. This form contains a demographics subform. The Child ID# is the primary key for the "Child Data" form and I have a autonumber "DemoNumber" for the primary key of the demographics subform.

The forms were working properly, until today....after being in them for approx 4 hours, the autonumber on the demographics form started to duplicate numbers. I don't understand why? Do you have any suggestions?
- maria
 
How are ya mguwc . . . . .

Have you tried [blue]Compact & Repair[/blue]?

Calvin.gif
See Ya! . . . . . .
 
As long as you remembered to specify one of the fields in each table as the Primary Key, then Access should automatically prevent duplicate values in the Primary Key fields. However, since an Autonumber field can be set to either allow or prevent duplicate entries, the behavior that you described could occur if you forgot to set the DemoNumber field as the Primary Key.

Burrito

 
Thank You for responding - I figured out the problem. I was doing an append query and had the autonumber as one of my fields to append. Of course it did not allow the record to append, but it did reset my autonumber. Therefore from that point on, whenever anyone tried to add a new demographics, the autonumber was continuing from a record which was already created. Because of this, it was giving us an error message.

The remedy was to run this append query again, this time removing the autonumber and replacing it with a fixed figure - the number that was to come next. Once I did this, the autonumbering reset itself and it is working fine.

- Maria
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top