Create a hidden list item, whenever user enters a doc no, insert that value into that list item. U can set the list item to reject duplicates. So if the duplicates are ever entered, an error will be generated and u can trap that to display it to the user.

Make sure to clear the list item after the record is inserted into the database.