procedure Terp.th(component:string;form:string);
var clpbrd:TClipBoard;
begin
clpbrd:=TClipBoard.Create;
with application.FindComponent(form) as tform do
begin
with tdbgrideh(FindComponent(component)) do
begin
with DataSource.DataSet do
begin
Bookmark:=Selection.rect.TopRow;
while True do begin
Edit;
fieldbyname(SelectedField.FieldName).value:=clpbrd.AsText;
Post;
if CompareBookmarks(Pointer(Selection.Rect.BottomRow),Pointer(Bookmark)) = 0 then Break;
Next;
if Eof then Break;
end;
end;
end;
end;
end;