How To Detect Empty Textbox Before Updating Record
Posted: Wed Mar 17, 2010 10:09 pm
This program will warn you if there is one or more empty textbox. You can modify it to handle empty checkbox, etc.
Code: Select all
Sub CheckEmptyTB()
Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
MsgBox "Empty TextBox!"
ctr.SetFocus
Exit Sub
End If
Next ctr
End Sub