I have wrote the code here, that works to ask a user to enter a user name and password, but I would like to set a limit to only alow the user to try 4 times and then be sent back to the main form. Everyhting I have tried so far doesnt work. Any Ideas I would apperaciate.