larrydavid
Programmer
Hello, Is it possible to do an inline VBA IIF statement like this:
strSQL = "SELECT tbl_StepbyStep.RecID, IIf ([tbl_StepbyStep.Milestone] = True,"Y","N"), tbl_StepbyStep.PhaseStep, tbl_StepbyStep.numMethodology " &
"FROM tblProjects INNER JOIN tbl_StepbyStep ON tblProjects.numProjMethodology = tbl_StepbyStep.numMethodology " & _
"WHERE ((Not (tbl_StepbyStep.ParentLink) Is Null) AND ((tblProjects.numProjID)=" & Form_frmProjPortfolio.numProjID & ") AND ((CLng(Left([ParentLink],InStr(1,[ParentLink],'.',1)-1))) LIKE " & Me.cboPhase & ")) " & _
"ORDER BY tbl_StepbyStep.ID;"
I've been researching this but cannot get to the syntax error. Could someone please show me the correct syntax?
Thanks,
Larry
strSQL = "SELECT tbl_StepbyStep.RecID, IIf ([tbl_StepbyStep.Milestone] = True,"Y","N"), tbl_StepbyStep.PhaseStep, tbl_StepbyStep.numMethodology " &
"FROM tblProjects INNER JOIN tbl_StepbyStep ON tblProjects.numProjMethodology = tbl_StepbyStep.numMethodology " & _
"WHERE ((Not (tbl_StepbyStep.ParentLink) Is Null) AND ((tblProjects.numProjID)=" & Form_frmProjPortfolio.numProjID & ") AND ((CLng(Left([ParentLink],InStr(1,[ParentLink],'.',1)-1))) LIKE " & Me.cboPhase & ")) " & _
"ORDER BY tbl_StepbyStep.ID;"
I've been researching this but cannot get to the syntax error. Could someone please show me the correct syntax?
Thanks,
Larry