Why does this not work

        If bolFoundItem <> vbTrue Then
            frmBuildSysParam.txtUserID.Text = strUserName
            Me.Close()     ' close frmMainMenu
            Exit Sub
        End If
The system closes out completely (exits the application)   Basically what I am trying to do is if a user has never used the application before to setup certain unique parameter, by loading a system parameter sreen.  This tests the network user ID against a table in MS-Access.  The exit sub should take me out of the procedure not the whole applications.  What am I missing?  
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Neil RussellTechnical Development LeadCommented:
me. close is the application and NOT the form. As you are showing the form, the form itself should close itself when finished with.
You CAN use me.close INSIDE the forms code.
WLoftusAuthor Commented:
The me.close is located in a procedure in the frmmainmenu.vb area, thus it is inside the forms code.  I have replaced the me.close with the me.hide command which did not work either.  I prefer to close out the forms and re open it when needed, (that's the old school in me).  When i open the form with the command "frmBuildSysParam.Show()", I would think the frmBuildSysParam form would have the focus, but it does not the system exits the application completely.  I would have thought that it would have passed control to the frmBuildSysParam form.  The "Exit Sub" command merely ends the procedure.  
Neil RussellTechnical Development LeadCommented:
Have you tried using frmBuildSysParam.close() ?
WLoftusAuthor Commented:
Yes I have but you receive an error message that you can't use the command frmMainMenu.close and the solution is to use me.close command.  .  

If you use the command "frmBuildSysParam.ShowDialog()", it works perfect.y.  The frmMainMenu closes as instructed and the frmBuildSysParam form is open with the prompter in the right place.  Why does this work and the simple close command does not?  

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WLoftusAuthor Commented:
Resolved problem myself
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.