Clearing a form

armesca

Registered User.
Local time
Today, 03:10
Joined
Apr 1, 2011
Messages
45
Is there any way to set all of the text boxes/combo boxes, etc to null values all at once in VB as opposed to clearing each one individually.
 
If the form is unbound, then you may want to try this:

Code:
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.ControlType = acComboBox Or ctl.ControlType = acTextBox Then
ctl.Value = Null
End If
Next ctl
 

Users who are viewing this thread

Back
Top Bottom