Login with Combobox and Multiple Users
Posted: Tue Aug 18, 2009 11:56 am
Hi All
Here is another very simple Tutorial on how to add a Login page to your applications and use a Combobox to add as may people as you like with different passwords. This can be usefull if you are designing something for multiple users.
The code goes on the Enter Button
I have used 5 names in my Combobox Example ( which you add in the Properties in the Collections tab)
and 1 textbox
and 6 forms ( each form links to Name that is selected )
and 1 button
But you can adapt it to suit yourselves.
![Image]()
![Image]()
![Image]()
![Image]()
Hope this is usefull to you all.
Chris
Here is another very simple Tutorial on how to add a Login page to your applications and use a Combobox to add as may people as you like with different passwords. This can be usefull if you are designing something for multiple users.
The code goes on the Enter Button
Code: Select all
I'm sure this could be adapted for use for .Net applications as well.If ComboBox1.SelectedItem = "David Hurst" And TextBox1.Text = "admin" Then
MsgBox("Welcome David")
Me.Hide()
Form2.Show()
End If
If ComboBox1.SelectedItem = "Mike Freder" And TextBox1.Text = "Coder" Then
MsgBox("Welcome Mike")
Me.Hide()
Form3.Show()
End If
If ComboBox1.SelectedItem = "Gary Wilkinson" And TextBox1.Text = "Tech Help" Then
MsgBox("Welcome Gary")
Me.Hide()
Form4.Show()
End If
If ComboBox1.SelectedItem = "Mary Tyler" And TextBox1.Text = "Payroll" Then
MsgBox("Welcome Mary")
Me.Hide()
Form5.Show()
End If
If ComboBox1.SelectedItem = "Rachel Weise" And TextBox1.Text = "Management" Then
MsgBox("Welcome Rachel")
Me.Hide()
Form6.Show()
End If
I have used 5 names in my Combobox Example ( which you add in the Properties in the Collections tab)
and 1 textbox
and 6 forms ( each form links to Name that is selected )
and 1 button
But you can adapt it to suit yourselves.




Hope this is usefull to you all.
Chris