Guest_imported
New member
- Jan 1, 1970
- 0
Hello
This is a text I found regarding clearing all text fields in a form. I have created a button called CLEAR in my form with name=CLEAR and caption=CLEAR. Could anyone tell me where to append the following code? There is already a function called Private Sub CLEAR_Click()
End Sub
opened in my form. The text is:
To use code to clear all text boxes on a form, type the following in the form's code window, and call it from the desired event or function:
Private Sub ClearTextBoxes( )
Dim ctl As Control
For Each ctl in Me.Controls
If TypeOf ctl is Textbox Then
ctl.Text = '' ''
End If
Next ctl
End Sub
This is a text I found regarding clearing all text fields in a form. I have created a button called CLEAR in my form with name=CLEAR and caption=CLEAR. Could anyone tell me where to append the following code? There is already a function called Private Sub CLEAR_Click()
End Sub
opened in my form. The text is:
To use code to clear all text boxes on a form, type the following in the form's code window, and call it from the desired event or function:
Private Sub ClearTextBoxes( )
Dim ctl As Control
For Each ctl in Me.Controls
If TypeOf ctl is Textbox Then
ctl.Text = '' ''
End If
Next ctl
End Sub