I have a form based on a table,with a primary index, which is the "EntryNumber" field for that form. If I enter a duplicate of an existing "EntryNumber"( ie the Index), and then close the form using the DoCmd.close statement, I expect to get an error message, but do not. At other parts of the program, I can change the "EntryNumber" so that it is a duplicate "EntryNumber" and it shows as an error, which I can trap and display. The problem only shows (ie No error) when the record I am entering via the form is a New Record (ie I do net get an error message for a duplicate "EntryNumber") whereas If I change an existing "EntryNumber" so that it duplicates another existing "EntryNumber", then I get the expected error when I close the form. Can anyone help me so that I can get the error when I close the form for a New Entry ?