troubleshooting Question

Text Boxes in VB.Net

Avatar of December2000
December2000 asked on
Programming Languages-Other.NET ProgrammingVisual Basic.NET
3 Comments1 Solution565 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
Mike Tomlinson
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros