do form "editpat" with thisform && or thisform.cUniqueNameIn your frmEditPat.Init:
lparameter loParentForm && or cParentFormUniqueName this.oParentForm = loParentFormWhen you want to go back to the parent form:
this.oParentForm.ReturnFocus()
This would call a custom method of your form and it should set focus as it decided. This helps because now your child form doesn't know anything about the internals of the calling form. If you ever changed the name of the listbox to something more meaningful like lstPatients your child form would error out because list1 no longer exists.* Your lowest level form subclass .Init() this.cUniqueName = sys(2015)This gives each form a unique identifier as it starts running. Then to look for it:
for each loForm in _screen.Forms if ( loForm.cUniqueName == lcSearchedForName ) loForm.BackColor = rgb( 255, 0, 0 ) && you'd probably want to do something more useful *g* endif endfor>I have one form (called CHART1) on which there is a listbox. When one double clicks on the list box, another form (EDITPAT) opens to allow user input. The EDITPAT 'OK' button has the following in the 'Click' method: