Use either the new() or if you have an older version there is a aRevertData[] array.
I think the accepted way is to place a new button on the form ( or call the button) and then use the afternew2() as follows:
LPARAMETERS cWorkarea
IF m.cWorkarea = 'Esclient'
DO FORM newclient TO lStatus
IF NOT m.lStatus
* User canceled the dialog, so we remove the new record from the update buffer.
THIS.DELETE(m.cWorkarea)
ENDIF
ENDIF
IF m.cWorkarea = 'Enroll'
*THISFORM.cmdatamanager.new('enroll')
THISFORM.cmdatamanager.REPLACE('enroll','clientid',esclient.clientid)
THISFORM.cmdatamanager.REPLACE('enroll','enroll_dte',DATE())
THISFORM.editmode()
THISFORM.openchild('enroll_class.scx')
ENDIF
Notice that I test if the user cancelled.
John
John Fabiani
Woodland, CA