You can set up your child form to participate in the same datasession as the parent form (Datasession = 1). Set up the controlsources for the controls on the child form to use the recordsource of the grid. That way when the record pointer changes on the parent, the child's controls should reflect the new record.
To make it go away and control it, you can add a form level property to your parent form and link the new form to that property when it is launched.
Button click
if vartype(THISFORM.oChildForm) <> "O" then
do form mychildform name THISFORM.oChildForm LINKED
else
THISFORM.oChildform.Show()
endif
When you move from record to record, you can also add code to the AfterRowColChange event of the grid to refresh the child form (if it doesn't display immediately) (e.g. THISFORM.oCHildForm.Refresh()).
HTH.
>I have a grid that is showing total results. However there could be a need to see the detail behind each record.
>
>Therefore I thought about doing it this way:
>
>A button on the form opens the new form with the detail info. As the user navigates through the grid, the form is updated to reflect the change in the grid. (i.e. Row)
>
>The button works fine, however... the grid change stuff doesn't. Instead of using the form that is open, it spawns another one.. and so on..
>
>Also, when I exit the parent form, the child form doesn't go away.
>(Obviously, it cannot find the child form.) I have to go in and clear out each one on my own.
>
>Any ideas,
>Mike
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao