do form formname
read events
Kris,
Your problem is in the code above. Here's the sequence of things. You DO FORM, the form's Load runs, then the Form's Init runs, you release the form and issue the CLEAR EVENTS, then the READ EVENTS is encountered and it keeps the app running.
Your code is issuing the READ EVENTS after the CLEAR EVENTS. Try changing the code to this;
>pre>
DO FORM FormName NAME loForm
IF TYPE("loForm.Name") = "C" && The form exists
READ EVENTS
ENDIF