1) The insert code has to be after the server validation code.
2) The recordset has to be added that is filtered by the two columns you want to make sure comprise a unique entry.
3) You have to add a number validation for the added recordset TotalRows to check that it is empty and doesn't have an existing record.