I have now changed it to:
Code:
If Me.SubTeamHeadDelID = Me.DelegateID Then
Dim strID As String
Dim strID2 As String
strID = Nz(DLookup("SubTeamParentID", "tblSubTeam", "DelegateID =" & Me.SubteamParentID), "0")
strID2 = (DLookup("DelegateMobileNumber", "tblDelegate", "ID =" & Me.SubteamParentID))
If strID = "0" Then
MsgBox "You don't need to contact anyone or whatever is needed"
Else
MsgBox "Please contact this SubTeamLeader or whatever " & strID2, vbOKOnly
End If
But still giving me same error and it prvents me from running the code with breakpoints to errorcheck because of the message