probaria esto
Código Delphi
[-]
procedure TdmDatos.ActualizaTotales(strID, strPeso: string);
begin
if dstTotales.Locate('BASCULA',Trim(strID),[loCaseInsensitive,loPartialKey]) then
begin
accCuenta := dstTotales.FieldByName('ACCOPERACION').Asinteger;
gblCuenta := dstTotales.FieldByName('GBLOPERACION').Asinteger;
dstTotales.Edit;
end
else
begin
accCuenta := 0;
gblCuenta := 0;
dstTotales.Append;
dstTotales.FieldValues['BASCULA'] := StrToInt(strID);
end;
Inc(accCuenta);
Inc(gblCuenta);
dstTotales.FieldValues['ACCOPERACION'] := accCuenta;
dstTotales.FieldValues['GBLOPERACION'] := gblCuenta;
dstTotales.Post;
end;
poca modificacion

podria ser el trim, o las mayusculas de BASCULA. He usado FieldValues solo para asegurar que existen los campos, y eliminar el with por legibilidad, nada mas.