Private Sub btnSampleFormValidate_Click (ByVal sender As _ System.Object, ByVal e As System.EventArgs) Handles _ btnSampleFormValidate.Click Dim aControl As System.Windows.Forms.Control For Each aControl In Me.Controls If TypeOf aControl Is TextBox AndAlso aControl.Text = "" Then aControl.Focus() Exit Sub End If Next End Sub