Edgar,
The problem you are having can be resulting from a few things. The most likely thing is that your T2.SCX form is NOT modal. In that case the code following the DO FORM would be executed before the form was even seen by the user. The IF UserPass would find UserPass emtpy and fall through the code without ever issuing the READ EVENTS.
First make sure the T2.scx is made modal by setting its WindowType is set to Modal. In the T2.scx Unload event put a line to return the user's password like RETURN Thsiform.Password or whatever it needs to be.
Then you can clean up your other code a little (like getting rid of the public variable UserPass).
Do STARTUP
...
<strong>UserPass = ""</strong>
DO Form ..\t2\t2.scx WITH prg2exe,SECpath <strong>TO UserPass<strong>
...
IF <strong>NOT EMPTY(USERPASS)</strong>
DO MENUTOOL.MPR
DO Form NTABTOOL
READ EVENT
ENDIF
DO CLEANUP
ON SHUTDOWN