
December 8th, 2011, 04:28 AM
|
|
Registered User
|
|
Join Date: Dec 2011
Posts: 23
Time spent in forums: 4 h 48 m 40 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by iswan2011 hai I am creating login page which have database connection.I want to modified my code here into multiuser access.For example is user are from admin department then he can access automatically into admin page after login successful
and if the user are from Counter department then he can access automatically into department page after login successful . In my database i have column 5 column which is username, password, phone, addresss and department. I have 2 textbox which is for username and password , also button login. For software i am using Microsoft visual 2005 and database i am using sql 2005. Please advice me .....
Public Class Form1
Dim name = Me.StaffTableAdapter
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click
Dim name = me.StaffTableAdapter.UsernamePassword(Me.txtusername.Text, Me.txtpassword.Text, Me.txtdepartment.Text)
if name is nothing then
Msgbox(Invalid username and password)
else
Admin.Show()
end if
end sub |
why not add another column/field to your data "startpage" and use it to get to the appropriate page
bill stewart - here to talk
|