1 - txtLotNo.GotFocus 2 - txtLotNo.LostFocus if empty(txtLotNo) * Do nothing, subsequent text box when's will prevent focus else && Not empty if seek(RIGHT(STR(txtlotno+100000000,9),8)) * Found, retrieve for edit existing LotNo and allow focus * txtLotNo focus disallowed for existing record * Enable delete else && Not found, must be a new lotno entry * messagebox([Add new lot number (y/n)?]) if Yes * New entry and allow focus else * Blank txtLotNo and Exit to 5 endif &&Yes endif &&seek(RIGHT(STR(txtlotno+100000000,9),8)) endif &&empty(txtLotNo) 3 - Save changes to new 4 - Or allow delete of existing 5 - Undo or disregard 6 - Recycle to "standby" state>Terry u asked me if they make a mistake do they have to delete erroneous record