>select rsShows >thisform.cancel() >thisform.ActivateParentPage(3)>
>DODEFAULT() >thisform.lMadeChanges = .f.>
>thisform.lAdded = .f. >thisform.lAdding = .f. >IF NOT EMPTY(ALIAS()) AND CURSORGETPROP("Buffering") > 2 > tablerevert(.t.) >ENDIF>
>lparameters tnPage >local lnIndex, lnParentIndex >thisform.pageframe1.ActivePage = m.tnPage >try > with thisform.ProductionSeriesTree as TListProLibCtl > lnIndex = .listindex > IF m.lnIndex < 0 && The item was deleted > lnIndex = thisform.LastSelectedIndex > endif > lnParentIndex = .ItemParent(m.lnIndex) > > .selected(m.lnParentIndex) = .t. && Activate the parent > endwith >catch to loError > ** >endtry