That error is an Access error so you probably should be posting there instead of Excel.

When asking about a VBA runtime error always tell us which line of code raises the error.

"Run-time error '3022': The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."

The error tells you pretty much what the problem is. Are you starting with an empty table? If not, what are you starting with? What is the primary key? What is the index? Is there just one table in your model?