Try this :
Dim ctrAs Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
If ctr.Text= vbNullString Then
MsgBox "Textbox empty"
ctr.SetFocus
Exit Sub
End If
End If
Next ctr
Jx_Man
Senior Poster
3,527 posts since Nov 2007
Reputation Points: 1,482
Solved Threads: 515
Skill Endorsements: 64
Question Answered as of 1 Year Ago by
Jx_Man