AndyCompanyZ
Registered User.
- Local time
- Today, 15:32
- Joined
- Mar 24, 2011
- Messages
- 223
I have a syntax error on the following code:
It runs through the first debugs and gives results in the immediate window that are correct but when it comes to the
strID = DLookup("SubTeamParentID", "tblSubTeam", "SubTeam = " & Me!SubTeam)
line it says there is a syntax error missing operator in it. Can anyone see the syntax error please.
Code:
If Me!SubTeamHeadDelID = Me!DelegateID Then
Dim strID As String
Dim strID2 As String
Debug.Print SubTeamParentID
Debug.Print SubTeam
strID = DLookup("SubTeamParentID", "tblSubTeam", "SubTeam = " & Me!SubTeam)
If strID = Null Then
MsgBox "You don't need to contact anyone or whatever is needed"
Else
strID2 = DLookup("DelegateMobileNumber", "tblDelegate", "ID =" & strID)
MsgBox "Please contact this SubTeamLeader & strID2", vbOKOnly
End If
End If
strID = DLookup("SubTeamParentID", "tblSubTeam", "SubTeam = " & Me!SubTeam)
line it says there is a syntax error missing operator in it. Can anyone see the syntax error please.