This will work, if the only error you're wanting to handle is the one with the 'duplicate value' message:
確定! 回上一頁