I keep geting a syntax error near ')' error with the following:
I'm sure it is right in front of me but I keep getting the error near ')' , a syntax error or unterminated string constant error. Always at the end of the subquery. The results of this query feeds an array which in turn feeds a drop down box which eliminates choices as they are picked.
Any help would be appreciated as my brain has turned to mush.
Code:
sSqlWrk = "SELECT [wrestlername], [wrestlername] AS DispFld, [weightclass] FROM [wrestler]"
If lteam.wrestlername.CurrentValue = "" Or IsNull(lteam.wrestlername.CurrentValue) Then
sSqlWrk = sSqlWrk & " WHERE 0=1"
Else
sSqlWrk = sSqlWrk & " WHERE [wrestlername] = '" & ew_AdjustSql(lteam.wrestlername.CurrentValue) & "'"
sSqlWrk = sSqlWrk & " AND (NOT EXISTS (SELECT lteam.wrestlername FROM lteam WHERE wrestler.wrestlername = lteam.wrestlername AND lteam.ltID = " & lteam.ltID.ViewValue & "))"
I'm sure it is right in front of me but I keep getting the error near ')' , a syntax error or unterminated string constant error. Always at the end of the subquery. The results of this query feeds an array which in turn feeds a drop down box which eliminates choices as they are picked.
Any help would be appreciated as my brain has turned to mush.