DebbieCoates
Programmer
i have a SQL statement that i am passing via VB, but for some reason I am getting an error saying that there is a missing operator in string, and yet when i run the statement I am trying to pass in the sql query analyser, it works perfect, has anyone any idea's why?
Dim sSQL As String
sSQL = "SELECT T_Funder.EnquiryID, T_Funder.FunderTypeID, T_Funder.FundSourceID, FunderTypes.FunderType, FundSources.name"
sSQL = sSQL & " FROM T_Funder LEFT OUTER JOIN"
sSQL = sSQL & " FunderTypes ON T_Funder.FunderTypeID = FunderTypes.FunderTypeID LEFT OUTER JOIN"
sSQL = sSQL & " FundSources ON T_Funder.FundSourceID = FundSources.fundsourceid WHERE (T_Funder.EnquiryID = '" & gEnquiryID & "')"
Debug.Print sSQL
Dim sSQL As String
sSQL = "SELECT T_Funder.EnquiryID, T_Funder.FunderTypeID, T_Funder.FundSourceID, FunderTypes.FunderType, FundSources.name"
sSQL = sSQL & " FROM T_Funder LEFT OUTER JOIN"
sSQL = sSQL & " FunderTypes ON T_Funder.FunderTypeID = FunderTypes.FunderTypeID LEFT OUTER JOIN"
sSQL = sSQL & " FundSources ON T_Funder.FundSourceID = FundSources.fundsourceid WHERE (T_Funder.EnquiryID = '" & gEnquiryID & "')"
Debug.Print sSQL