Does anyone know how to set up a procedure that will check the field in a subform for duplication of Code, and allow the entry if that code has and ending date. For example the program I am designing have BCodes which are benefits codes. The subform is linked to the main form is by SSN. On the subform the user doesn't want the BCode to be duplicated unless the Ending Date is on the previous BCode, then the BCode can be duplicated. If anyone have a suggestion, please let me know I would greatly appreciate it.