You could do it this way:
do main
a) main program
** some settings here
do form password
read events
b) Form password should call the first form, after a valid password was entered
In the queryunload method put this code
thisform.release
do form firstform
c) In the called form, in this example firstform, do your business and when it closes, put the following code in the queryunload method
release thisform
clear events
This will bring you back to the command window
Rafael Copquin
Treasurer - Microsoft Users Group of Argentina (MUG)
www.mug.org.ar