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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble adding new records

Status
Not open for further replies.

Lv2valt

Programmer
Aug 21, 2001
8
US
Every time I try to add a new record in my form view it always tells me that it would create a duplicate value of the primary key. I have the primary key set to autoNumber but they are not consecutive numbers because of deletions and such. For adding a new record I have just used the built-in function:
DoCmd.GoToRecord , , acNewRec

Is there anything else I can do?

Thanks
 
I expect that if you look at your table you'll find that you set an index to "Yes (No Duplicates)". This would produce that duplicate error because Access is disallowing you to enter in a duplicate value on one of your indexed fields.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top