I have 3 Users and I have a different environment for each. How do I code that in my initial form(login form)?

I need help:

My sample

If dr.Read=true then
Dim adp as New OleDbDataAdapter("Select * From tblUSer WHERE Security_Profile='User 1'","PATH")
Dim dt as New DataTable
adp.Fill(Dt)
Homepage.Show()
Homepage.Button1.Enabled=False
Form3.GroupBox1.Enabled=False
Form3.GroupBox1.Enabled=False
Form3.GroupBox1.Enabled=False
Elseif dr.Read=true then
Dim adp as New OleDbDataAdapter("Select * From tblUSer WHERE Security_Profile='User 2'","PATH")
Dim dt as New DataTable
adp.Fill(Dt)
Homepage.Show()
Form3.GroupBox1.Enabled=False
Form3.GroupBox1.Enabled=True
Form3.GroupBox1.Enabled=False
Elseif dr.Read=true then
Dim adp as New OleDbDataAdapter("Select * From tblUSer WHERE Security_Profile='User 3'","PATH")
Dim dt as New DataTable
adp.Fill(Dt)
Homepage.Show()
Form3.GroupBox1.Enabled=False
Form3.GroupBox1.Enabled=True
Form3.GroupBox1.Enabled=True

Can somebody please help?I don't know how to limit it by user.

Please use code tags when posting code:

[code]

...code here....

[/code]

As far your question --
I have posted a C# Windows Form login screen code snippet at:
http://www.daniweb.com/code/snippet217409.html

You can port the logic over to VB.NET and away you go :)

Sir I'll post my codes I hope you'd help me:)okay?

Please use code tags when posting code:
[noparse]
[code]
...code here....
[/code]
[/noparse]

As far your question --
I have posted a C# Windows Form login screen code snippet at:
[url]http://www.daniweb.com/code/snippet217409.html[/url]

You can port the logic over to VB.NET and away you go :)

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.