Private Function fSomeMT() As Boolean
'fSomeMT = Some Empty
Dim conAppName As String
conAppName = "(Replace this Local Variable with a Global One) "
Dim strSubName As String
Dim strModuleName As String
strSubName = "fSomeMT"
strModuleName = "Form - " & Me.Name
On Error GoTo Error_Handler
Dim Ctrl As Control
Dim intEmptyCtrls As Integer
For Each Ctrl In Me.Controls
Select Case Ctrl.ControlType
Case acTextBox
If Left(Ctrl.Name, 6) = "tbGame" Then
Ctrl.BorderColor = vbBlack
Ctrl.BackColor = vbWhite
If IsNull(Ctrl) Then
intEmptyCtrls = intEmptyCtrls + 1
Ctrl.BorderColor = vbRed
Ctrl.BackColor = vbYellow
End If
End If
End Select
Next Ctrl
If intEmptyCtrls > 0 Then
fSomeMT = True
End If
Exit_ErrorHandler:
Exit Function
Error_Handler: 'Version - 1a
Dim strErrFrom As String
Dim strErrInfo As String
strErrFrom = "Error From:-" & vbCrLf & strModuleName & vbCrLf & "Subroutine >>>>>>> " & strSubName
strErrInfo = "" & vbCrLf & "Error Number >>>>> " & Err.Number & vbCrLf & "Error Descscription:-" & vbCrLf & Err.Description
Select Case Err.Number
Case 0.123 'When Required, Replace Place Holder (0.123) with an Error Number
MsgBox "Error produced by Place Holder please check your code!" & vbCrLf & vbCrLf & strErrFrom & strErrInfo, , conAppName
Case Else
MsgBox "Case Else Error" & vbCrLf & vbCrLf & strErrFrom & strErrInfo, , conAppName
End Select
Resume Exit_ErrorHandler
End Function 'fSomeMT