Form3.Adodc1.RecordSource = "select * from login where username = '" + Text1.Text + "'"
Form3.Adodc1.Refresh
If Form3.Adodc1.Recordset.EOF = False Then
If (Text2.Text = Form3.Adodc1.Recordset.Fields("password")) Then
MsgBox "login success"
Unload Me
Else
MsgBox "invalid pasword"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Form2.Refresh
End If
Else
MsgBox "invalid username"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Form2.Refresh
End If
If Form3.Adodc2.Recordset.EOF = False Then
msg = MsgBox("Go to Inventory?", vbYesNo, "WELCOME")
If msg = vbYes Then
Form2.Hide
Form5.Show
Else
Form2.Hide
Form3.Show
End If
End If
....this is my login command code.....
QUESTION : can someone help me with this...the logic of my system is if admin was login he can access all forms he can create new user he can access inventory but if a regular user login he can only access inventory he can't access the form which can create another user ...PLEASE HELP ME THIS IS A VB6 SYTEM....I NEED THIS...ASAP....i will attach my files in here so that you can see all my codes and my whole system....