I have the code below which works great. However, what I really want is to sort the Controls collection in the order that I have set the TabIndex of the controls.
Haven't quite figured it out....
Haven't quite figured it out....
Code:
Function IsDataFilledIN() As Boolean
IsDataFilledIN = True
For Each subcontrol As Control In Me.Controls
If subcontrol.Tag = 1 Then
If subcontrol.Text = "[Select value]" Then
MsgBox("Value must be filled in. " & subcontrol.Name)
subcontrol.Focus()
subcontrol.BackColor = Color.Red
Return False
Exit Function
End If
End If
Next subcontrol
End Function