Hello,

I'm new to VB and I am having problems getting this login screen to work. I'm using VB 6.0 and Access 97. My comand button that is supose to find and compare the user information looks like this:

Code:
Private Sub login_Click()
SearchSting = "User = " & Trim(txtUser.Text)
If txtUser.Text <> "" Then
  Data1.Recordset.FindFirst SearchSting
  If Data1.Recordset.NoMatch = True Then
    MsgBox "Please Enter a Valid User Name"
  Else
    If optReg.Value = True Then
      Load register
      register.Show
    Else
      Load DBAdmin
      DBAdmin.Show
    End If
  End If
End If
End Sub
I don't know what I'm doing wrong. If someone can help me out it would be cool. I have atach my login form and my login database in a zip file so you can take a look. Thanks for your help in advance!

-123