Hi Tom
It appears that if ChkPrimary_Contact is checked then you are actually adding the record twice. If there is an existing primary contact for the company, then the new record is added at lines 56-67, and if not, it is added at lines 23-34. Then, no matter what has happened before, a new record is added at lines 85-96. If this is a primary contact then you will be creating a duplicate record.
Also, if there is already a primary contact for the company and you do not answer "Yes" to the question at line 41, then the newly added record at 56-67 will be a second primary contact. Presumably this is not what you want.
It seems to me you would be better to ascertain whether or not the new contact should be the primary, and then add the record just once - see the revised code attached below.
Good luck!
--
Graham