0

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.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Alphard
0

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 :)

Edited by happygeek: fixed formatting

This topic has been dead for over six months. 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.