Created
February 2, 2017 12:13
-
-
Save Phuseos/e789dcedeac54ed7494f757cb625d242 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CleanFormTextboxes() | |
'Empty textboxes in the current form | |
'Loop through the controls | |
Dim ctrl As Control | |
Dim txt As TextBox | |
'If a textbox is found in the loop and the text is more then 1 character, empty it | |
For Each ctrl In Me.Controls | |
If TypeOf ctrl Is TextBox Then | |
Set txt = ctrl | |
If Len(txt.Value) > 0 Then txt.Value = Null | |
End If | |
Next ctrl | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment