Caundo usas formas heredadas es facil utilizar en la forma base:
Código Delphi
[-]procedure formabase_frm.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
var
i,opcionelegida:integer;
begin
inherited;
i:=0;
opcionelegida:=-1;
while (i<=ComponentCount - 1) do
begin
if (Components[i] is Tdatasource) then
begin
if TdataSource(Components[i]).State in [dsedit, dsinsert] then
begin
if opcionelegida = -1 then
opcionelegida:=Application.MessageBox('Existen Datos sin guardar, Desea Grabar los Cambios',
'Guardar', MB_YESNOCANCEL + MB_ICONINFORMATION );
if opcionelegida <> -1 then
begin
case opcionelegida of
ID_NO:begin
TdataSource(Components[i]).DataSet.Cancel;
end; ID_YES:begin
TdataSource(Components[i]).DataSet.Post;
end; ID_CANCEL: begin
CanClose := False;
end;
end; end; end; end; inc(i);
end;end;
Con lo cual Validas todos los datasources de tu forma, que porque datasource y no dataset, es por los que usamos los datasets en un modulo
Espero te sirva de algo