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

Auto Incremental Error when duplicating record

Status
Not open for further replies.

howellk

Programmer
Jun 5, 2014
2
0
0
I use a button on a browse to duplicate a record, and before saving the "cloned" record, I rename the unique id.

This works on a table with one unique key, for example:

file_id - primary key, unique, alpha-numeric

However, attempting to duplicate a record on a table with two unique keys, see below, will result in an auto incremental error, which make sense:

file_id - primary key, unique, alpha-numeric
serial_no - unique, auto number

I assume the error being posted relates to the "secondary' key, and what needs to be done is to manually prime the "secondary' key by first getting the previous record in sequence?

Any advice/help appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top