login form question

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

My login form will call a main form with menu
in my button_OK click event
dim frmMain as new mainform
frmMain.show()
Me.dispose()

The login form didn't close by itself, Please help.. Thanks
 
well how about instead.

Sub Main

in a main module.

dim flogin as new frmLogin

'check a Successful property--that you should create--on 'flogin
to see if successful--or better yet maybe you just want the login dialog to
get username and password and when user click OK, close form, and then in
Sub Main read a UID and PWD property from flogin form--that you would
create, do your login validation and allow entrance or exit the program
if flogin.Successful then
dim fMain as new frmMain
fMain.ShowDialog
end if
end Sub

HTH,

Shane
 
You mean that I should set "module" as start but not a "login form" ???
Thanks
 
Seems to work better.
that way login opens, closes and is gone.
then you decide on entrance to the main form or not.

Shane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top