Bem pior do que isso é aquando do registo no histórico de apenas os campos alterados! Na maioria das vezes, não dá para perceber a que registo da tabela/ficheiro pertence a alteração. Falta o elemento de identificação unívoca PKey ou outro. Tabém parece que no unit UCHist_Form este código ou semelhante ajudaria muito; deixo ao V/criterio a sua implementação “Oficial” ou não:
procedure TFrmHistorico.StringGrid1DrawCell(Sender: TObject; ACol,
ARow: Integer; Rect: TRect; State: TGridDrawState);
Var sa, sb:string;
begin
// 1.º evolui sobre a coluna depois sobre a linha
if ACol=1 then
sa:=Trim(StringGrid1.Cells[ACol,ARow])
else
if ACol>1 then
sa:=Trim(StringGrid1.Cells[ACol-1,ARow]);
if ACol=2 then
sb:=Trim(StringGrid1.Cells[ACol,ARow]) ;
if ACol =2 then
if ARow>1 then
if ( sb <> sa ) then
begin
StringGrid1.Canvas.Brush.Color := $00940A4B;
StringGrid1.Canvas.Font.Style := [fsBold];
StringGrid1.Canvas.Font.Color := clYellow; // clHighlightText;
StringGrid1.Canvas.FillRect(Rect);
StringGrid1.Canvas.TextOut(Rect.Left+2,Rect.Top+2,StringGrid1.Cells[ACol, ARow]);
end ;
end;
Abraço
Mário