>** Somwhere in your form >IF thisform.CheckForGrid(this) > MessageBox("There is a grid") >ENDIF > > >*** Method CheckForGrid >LPARAMETERS loObject >LPARAMETERS lnFor >DO CASE > CASE UPPER(loObject.BaseClass) $ [FORM PAGE CONTAINER] > FOR m.lnFor = 1 TO loObject.ControlCount > IF thisform.CheckForGrid(loObject) > RETURN .t. > ENDIF > NEXT >ENDCASE >RETURN (UPPER(loObject.BaseClass) == "GRID") >>Something like that, but not tested at all