Sub App_Start Form1.Show Msgbox(IsEmpty) ClearAllTextboxes Msgbox(IsEmpty) End Sub
Sub ClearAllTextboxes controls() = GetControls("form1") For i = 0To ArrayLen(controls()) - 1 If ControlType(controls(i)) = "TextBox"Then'note that the control type is case sensitive. Control(controls(i), Textbox).Text = "" EndIf Next End Sub
Sub IsEmpty controls() = GetControls("form1") For i = 0To ArrayLen(controls()) - 1 If ControlType(controls(i)) = "TextBox"Then If Control(controls(i), Textbox).Text <> ""ThenReturnFalse EndIf Next ReturnTrue End Sub