I am working on Visual Basic with a Login_Form
. I would like to pass a value from Login_Form
to TableSelection
. It works for the first time, but when I log out and login again. The TableSelection
get the same value as the first time I passed.
Here's my code:
idNumber
is the public variable in the TableSelection
Private Sub LoginButton_Click(sender As Object, e As EventArgs) Handles LoginButton.Click
Select Case EmployeeIDTextBox.Text.Substring(0, 1)
Case 1
MainScreen.Show()
'Number starts with 2 takes user to waiter screen
Case 2
TableSelection.idNumber = EmployeeIDTextBox.Text.Substring(1, 1)
TableSelection.Show()
End Select
Me.Hide()
End Sub
The login works with different EmployeeID, but the TableSelection does not update the ID