The code fails to run because the primary column (plus auto number) cannot be updated. Remove the autonumber property then it will work.