Link to home
Start Free TrialLog in
Avatar of December2000
December2000

asked on

Text Boxes in VB.Net

How do I change this code to display an ongoing record of the log in's in the txtResults text box. Right now it will only show one log in at a time....

Public Class Form1

    Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _
            btn0.Click, Btn1.Click, Btn2.Click, btn3.Click, btn4.Click,
            btn5.Click, btn6.Click, btn7.Click, btn8.Click, btn9.Click, btn0.Click

        Dim btn As Button = DirectCast(sender, Button)
        txtNumber.Focus()
        txtNumber.SelectedText = btn.Text
    End Sub

    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        txtResults.Clear()
        txtNumber.Clear()
    End Sub


    Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click
        Dim intResults As Integer
        If Integer.TryParse(txtNumber.Text, intResults) Then
            Select Case intResults
                Case 1000 To 1600
                    txtResults.Text = DateTime.Now() & " Technical Personnel"
                    Exit Sub

                Case 8001 To 8005
                    txtResults.Text = DateTime.Now() & " Custodial Sevices"
                    Exit Sub

                Case 999898, 1000001 To 1000008
                    txtResults.Text = DateTime.Now() & " Scientific Personnel"
                    Exit Sub

            End Select
        End If
        txtResults.Text = DateTime.Now() & " Access Denied"
    End Sub

End Class

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Haver Ramirez
Haver Ramirez

I dont understand.
Avatar of December2000

ASKER

@Idle_Mind Thank you... you get me.... I am still learning the correct vocabulary and phrases thank you for being so nice to me :)