Good day!
I want to check all txtbox and combox(style=2) in a form when the user click save. If one textbox or one combobox is not fill in then i will show a message that cannot submit. One or more fields requires entry.I dont know whats wrong with my code below.It does not read even if textbox or combobox is null.
Public Sub clarifydata()
For Each txt In Me.Controls
If TypeOf txt Is TextBox Or TypeOf txt Is ComboBox Then
If txt.Text = "" Then
toclear = toclear + "0"
Else
toclear = toclear + "1"
End If
End If
Next
If toclear Like "1" Then
clarifyclear = True
Else
clarifyclear = False
End If
End Sub
Any reply will be very appreciated.!
God bless on this mother earth.