Duplicate an entry that doesn't allow duplicate entries?

Duplicate an entry that doesn't allow duplicate entries?

Is there any way to code, to change the data that doesn't allow for duplicate entries.

I have a LOT tracking system and the LOT numbers can not be duplicated.  YYMMDD## I want to duplicate the record and sub forms but change the ## before doing  it so the record won't be a duplicate.  I've tried from a report to check the box and click on the duplicate icon only to have it fail.  Any way I can do this via a program or catch it before it it tries to store the record?

Thanks
Andy