>ON SHUTDOWN >SET SYSMENU TO >CLOSE DATABASES ALL >WAIT CLEAR >RELEASE ALL EXTENDED >CLEAR EVENTS >QUIT >>
* pretend main program do form loginForm && loginForm is modal read events && this line is not necessary...and will not get executed && until *after* the modal form has been releasedIt sounds like you want to go 2 possible directions based what the user does in this form. You might need something like this:
* pretend main program do form loginForm to lSuccess if lSuccess do mainMenu read events else * end of main program...foxpro will quit here endifUse the unload method of loginForm to return a true or false value. I know I'm leaving out a lot of stuff that also goes in your main program.