Hi
I have table1 , Key Location Code,Date. I want before insert if record already exists then it should not Insert.
IF TEntry.FINDFIRST THEN BEGIN
TeDate := TEntry.Date;
Amount := 0;
REPEAT
Amount += TEntry."Amount";
IF TeDate <> TEntry.Date THEN BEGIN
CNLine.VALIDATE("Store No.","No.");
CNLine.VALIDATE("Date",TEntry.Date);
CNLine.VALIDATE("Amount",TEntry."Amount");
CNLine.INSERT;
TeDate := TEntry.Date;
Amount := 0;
END;
UNTIL TEntry.NEXT=0;
END;
*This post is locked for comments