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..

Recommended Answers

All 2 Replies

@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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.