G
Guest
Dear all,
I create a main form that has menu to open login form. The main form has
menus disabled at first load (except menu to open login form). When the login
form pops up, user can give his/her credential to connect to database and
activate appropriate menus based-on his/her level.
I have written this code under cmdConnect_Click:
01 Dim frmLogin as New Login
02 frmLogin.ActivateMenu(UserLevel)
03 frmLogin.Show
04 Me.Close
-->Results in a new main form pops up.
In I omit the New keyword at line 01, then an error will occured said that
"Object Reference not set to an instance."
Pls advice. Thank's
I create a main form that has menu to open login form. The main form has
menus disabled at first load (except menu to open login form). When the login
form pops up, user can give his/her credential to connect to database and
activate appropriate menus based-on his/her level.
I have written this code under cmdConnect_Click:
01 Dim frmLogin as New Login
02 frmLogin.ActivateMenu(UserLevel)
03 frmLogin.Show
04 Me.Close
-->Results in a new main form pops up.
In I omit the New keyword at line 01, then an error will occured said that
"Object Reference not set to an instance."
Pls advice. Thank's