After performing a prefill in a BAS\IAS tax form, then closing out of the form, the violation of primary key error may occur.
This occurs when HandiTax has been opened through Practice Manager\HandiSoft.
Open HandiTax (HtXXSql.exe) directly from its own shortcut or through the HSoft\Apps folder and the error won't occur.

