I am have a public function which generates a unique autonumber(LogNo). This number is not my primary key. My primary key is called IncNo and no duplicates are allowed. I