procedure TForm1.StringGrid1DblClick(Sender: TObject);
var
p: TPoint;
row: integer;
col: integer;
account: String;
begin
p := StringGrid1.ScreenToClient(Mouse.CursorPos);
StringGrid1.MouseToCell(p.X, p.y, col, Row);
if (Row >0) then
begin
account := StringGrid1.Cells[0,row];
if account <> 'Totals' then
begin
TabSheet2.Caption := StringGrid1.Cells[0,row];
ReleaseCapture;
PageControl1.ActivePage := TabSheet2 ;
end;
end;
end;