Tuesday, December 30, 2003

Here is an interesting code snippet. If you ever need to clear a large amount of text boxes on a form then the following code will do it. Of course based on the control type you can certainly change the type of control and you are off and running!

Dim ctrl As Control
For Each ctrl In Me.Controls
  
If TypeOf ctrl Is TextBox Then
          
ctrl.Text = ""
  
End If
Next


9:01:15 AM