>Thanks - returning .f. does the trick to a degree but I really want to clear events as well so that the program closes - it doesn't seem that clear events can be called in the load event of a form or it doesn't appear to be taken notice of! I step through my code and the return .f. brings me back to my read events command (even if I issue clear events just before return .f. Any ideas? and thanks again
If you have a calling routine, when you stop instantiation of the form you could set an oApp property or a global variable property to indicate the application shoudl be exited, then issue CLEAR EVENTS, e.g. in the form Init
IF THISFORM.CancelFormLoad
oApp.ShutTheAppDown = .T.
RETURN .F.
ENDIF
Then in the calling routine:
IF oApp.ShutTheAppDown
...
CLEAR EVENTS
ENDIF
Again you probably need to massage it for your scenario, but you get the idea.
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.