Question : user authentication in visual basic 2005

Hi,
I have added a login form to my visual basic 2005 application with an Access table as a backbone, and have added the following code under the SUBMIT button.

If UserName.Text = "test" AndAlso Password.Text = "test" Then
        Dim frmMain As New Main
       frmMain.Show()
       Me.Close()
      End If

However, what I need is for direct access authentication without me filling in "test" for username and password.
Can someone please help me as it is very urgent.

Answer : user authentication in visual basic 2005

Change this:
formLogin.Show()

To:
formLogin.ShowDialog()

In the formLogin if the login/password its not OK then you do End (check on form unload also)

Random Solutions  
 
programming4us programming4us