private sub command1_Click()
dim c as Control
for each c in form.controls
   if typeof c is msflexgrid then
     msgbox c.name
   end if
nextend sub