var i:integer; begin for i := 0 to ComponentCount-1 do if( Components[ i ] is TADOQuery )then (Components[ i ] as TADOQuery).Open; end;