how do I clear a field? After I made transactions?

Depends what you mean by "field". To clear a text control you set the Text property to the null string as in

TextBox1.Text ""

textbox1.Text = ""

you can do somthing like this . add a module and just call this public sub at your form when ever you want to clear your textboxes or other controls .

   Public Sub ClearAllTextBox(ByVal myControl As Object)
            Dim i As Integer
            For i = 0 To myControl.Controls.Count - 1
                If TypeOf myControl.Controls(i) Is TextBox Then
                    myControl.Controls(i).Text = ""
                ElseIf TypeOf myControl.controls(i) Is MaskedTextBox Then
                    myControl.controls(i).text = ""
                ElseIf TypeOf myControl.controls(i) Is ComboBox Then
                    myControl.controls(i).text = ""
                End If
        End Sub

just call it like this where you need.

    'or if you have many group boxes or panel then then in place of me just write the name of group box or panel like this 

hope this will help you


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.