Although you need to set it, I use the datasheet caption property so a label doesn't need to be present;
This also gathers the missing values into a single message box, and relies on a tag property being set. It alters the background colour to yellow.
It also resets the colours on the controls so they don't get left behind if they fail validation the second time.
Code:
Function ValidateRecs() As Boolean
Dim sControls As String
Dim ctl As Control
Dim ctlColour As Long
For Each ctl In Me.Controls
If ctl.Tag = "Req" Then 'Reset the colours
If ctl.BackColor = vbYellow Then
ctlColour = GetHexColor("#C6D9F1") ' light blue
ctl.BackColor = ctlColour
End If
If ctl.Enabled Then
'Debug.Print ctl.Name, ctl.value, ctl.Properties("DataSheetCaption")
If IsNull(ctl.value) Then
sControls = sControls & ctl.Properties("DataSheetCaption") & vbCrLf
ctl.BackColor = vbYellow
End If
End If
End If
Next ctl
ValidateRecs = True
bOkClose = True
If Len(sControls & "") > 0 Then
Box "The following fields require data before the completion date can be entered;" & vbCrLf & vbCrLf & sControls, vbInformation + vbOKOnly, "Missing Data!", , , 0, , 0, 0
ValidateRecs = False
bOkClose = False
End If
End Function
Be aware I use a custom message box hence the slightly different layout for the message box line.