LOCAL loForm, lnCurrentPage lnCurrentPage = THISFORM.pgPatient.ACTIVEPAGE DO CASE *---------------------------------------------------------------- * Patient Page *---------------------------------------------------------------- *!* CASE lnCurrentPage = THISFORM.pgPatient.page1.PAGEORDER *!* WITH THISFORM.pgPatient.page1.cntPatient *!* .PatientEmployersBizobj1.REQUERY() *!* .SetButtons() && Reset Buttons *!* ENDWITH *---------------------------------------------------------------- * Guarantor Page *---------------------------------------------------------------- CASE lnCurrentPage = THISFORM.pgPatient.page2.PAGEORDER THISFORM.pgPatient.page2.cntGuarantor.SetGuarantorControls(.f.) && Disable Guarantor controls ENDCASE *----------------------------------------------------------------- *-- If the queue management form needs to be updated, then we *-- do it from here. The actual row of data that gets written *-- into the activity table is done from the trans_resolution object. *----------------------------------------------------------------- IF THISFORM.lRequeryQueueMgt && ***** Name of the form has to include No "1" otherwise won't work ***** * loForm = goApp.oForms.GET('frmInvestigatorQueueMgt1', 'Name') * IF VARTYPE(loForm) = "O" loForm = thisform.oCallingForm IF VARTYPE(loForm) = "O" AND UPPER(loForm.Class) = UPPER('frmInvestigatorQueueMgt') loForm.oBizobj.lResolved = .T. loForm.oBizobj.cTrans_pk = THISFORM.cTrans_pk loForm.oBizobj.PostRequeryHook() loForm.RefreshTotals() loForm.REFRESH() ENDIF THISFORM.lRequeryQueueMgt = .F. && Reset the flag ENDIF DODEFAULT()and it just stroke me, that the code will fail if we remove some pages, say, page2.