Please Help me with my project. I'm currently first year in college and one of our projects is to make a system that will have database.
What I want to do is when I login to the Interface the value of the username will be diplayed throughout the whole program. I'm currently using vb6 and so far I'm trying this code.
I'm new to this and so I can't find it on my own.
Here's the code so far;
Private Sub Command1_Click()
If Adodc2.RecordSource = "Select * from Cashier where username='" + AbLogin.Text1.Text + "'" Then
Adodc2.RecordSource = "Select * from Cashier where fname='" + Text1.Text + "'"
End If
and I try this one;
Set con = OpenDatabase("C:\Users\63927\Desktop\Project Cashier\\DatabaseFinale.mdb")
Set rr = con.OpenRecordset("select * from Cashier")
If AbLogin.Text1.Text = rr.Fields("username").Value & rr.Fields("username").Value = Text1.Text Then
Adodc2.Recordset.Fields("fname") = Text1.Text
End If