$ 0 0 SetDates(Rec, StartDate2, EndDate2, Regelkorting); Rec.SETRANGE(StartDate2,StartDate2); IF Rec.COUNT > 1 THEN ERROR('Number already exists ');