0
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....i need you to correct my codes....pls...pls..pls..

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by peter_budo
0

@masterfact18 please do not create multiple posts to ask same question

@abelingaw, nicely spotted, but please in the future use "Flag Bad Post" button to notify us of issues concerning marked post.

For others, thread is closed. Please follow link in abelingaw post.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.