hi,
I have a small doubt,, may be a stupid question. I have more than 5 tables, I need all those. what I have done now is I made 5 dbgrid , 5 tquery and 5 data source. designing looks so complicated. I need to count all those elements in the table,dat I have given in a button event.so der is 5 button event also. what io wish to do is I need a single dbgird to sove my pbm, below is my code

please help me to solve this pbm. as I am new to my job and programming)
procedure Tquotfrm.Button4Click(Sender: TObject);
begin
PRQry.close;
PRQry.SQL.Add('select count(*) as tot from PReturns;');
PRQry.FieldByName('tot').AsInteger;
PRQry.Active := true;
PRQry.open;
end;
procedure Tquotfrm.Button5Click(Sender: TObject);
begin
quotQry.close;
quotQry.SQL.Add('select count(*) as tot from QuHead;');
quotQry.FieldByName('tot').AsInteger;
quotQry.Active := true;
quotQry.open;
end;
procedure Tquotfrm.Button6Click(Sender: TObject);
begin
DOQry.close;
DOQry.SQL.Add('select count(*) as tot from DoHead;');
DOQry.FieldByName('tot').AsInteger;
DOQry.Active := true;
DOQry.open;
end;
procedure Tquotfrm.Button7Click(Sender: TObject);
begin
SIQry.close;
SIQry.SQL.Add('select count(*) as tot from SInvoice;');
SIQry.FieldByName('tot').AsInteger;
SIQry.Active := true;
SIQry.open;
end;
procedure Tquotfrm.Button8Click(Sender: TObject);
begin
SRQry.close;
SRQry.SQL.Add('select count(*) as tot from SReturns;');
SRQry.FieldByName('tot').AsInteger;
SRQry.Active := true;
SRQry.open;
end;
procedure Tquotfrm.Button9Click(Sender: TObject);
begin
TRQry.close;
TRQry.SQL.Add('select count(*) as tot from StkRptHdr ;');
TRQry.FieldByName('tot').AsInteger;
TRQry.Active := true;
TRQry.open;
I am using Delphi 2010 and sql