>Bruce has given you a fine solution to your question. But you might consider another approach, which is to create a Top-Level Login form and run it with a READ EVENTS after DO FORM MyLogin or oLogin = Createobject(...) however you do it. Then CLEAR EVENTS in the Login form when the user closes it. Then based on the outcome of the user login, I either bail them out or do my application setup and make the desktop visible, which for me is _SCREEN. Just another possibility for you to consider.
Er, yes, that's actually the way I do it, too, except with a second top-level rather than _screen :) I modified my suggestion to fit the situation...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.