B
Bryan Hughes
Hello,
How should I write this string to make it a working SQL string?
strSQL = "SELECT DISTINCTROW tblMain_File.CFID, tblMain_File.IOD,
tblMain_File.FCAD, tblMain_File.FST, IIf([FST]<>"NACF" Or
"NA","OPEN","CLOSED") AS FS, tblFST.COD, tblFST.CM, tblFST.ARS,
tblFST.CSAPP, tblFST.FAN, tblFST.FL, tblFST.FSP, tblFST.FSTC,
IIf([CID]<>"",[CID],"NOT A CLIENT") AS ClientID, tblPrimary_Contact.FN & " "
& tblPrimary_Contact.LN AS Name, tblPrimary_Contact.SA,
tblPrimary_Contact.City, tblPrimary_Contact.State,
tblPrimary_Contact.ZipCode, tblPrimary_Contact.HP, tblPrimary_Contact.CP,
tblPrimary_Contact.MP, tblPrimary_Contact.WP
FROM (tblMain_File INNER JOIN tblFST ON tblMain_File.CFID = tblFST.CFID)
INNER JOIN tblPrimary_Contact ON (tblMain_File.CFID =
tblPrimary_Contact.CFID) AND (tblFST.CFID = tblPrimary_Contact.CFID)
WHERE (((tblMain_File.CFID) = [Forms]![frmNew_Client_Details]![txtCFID]))
GROUP BY tblMain_File.CFID, tblMain_File.IOD, tblMain_File.FCAD,
tblMain_File.FST, IIf([FST]<>"NACF" Or "NA","OPEN","CLOSED"), tblFST.COD,
tblFST.CM, tblFST.ARS, tblFST.CSAPP, tblFST.FAN, tblFST.FL, tblFST.FSP,
tblFST.FSTC, IIf([CID]<>"",[CID],"NOT A CLIENT"), tblPrimary_Contact.FN & "
" & tblPrimary_Contact.LN, tblPrimary_Contact.SA, tblPrimary_Contact.City,
tblPrimary_Contact.State, tblPrimary_Contact.ZipCode, tblPrimary_Contact.HP,
tblPrimary_Contact.CP, tblPrimary_Contact.MP, tblPrimary_Contact.WP;"
Thank you
-Bryan
How should I write this string to make it a working SQL string?
strSQL = "SELECT DISTINCTROW tblMain_File.CFID, tblMain_File.IOD,
tblMain_File.FCAD, tblMain_File.FST, IIf([FST]<>"NACF" Or
"NA","OPEN","CLOSED") AS FS, tblFST.COD, tblFST.CM, tblFST.ARS,
tblFST.CSAPP, tblFST.FAN, tblFST.FL, tblFST.FSP, tblFST.FSTC,
IIf([CID]<>"",[CID],"NOT A CLIENT") AS ClientID, tblPrimary_Contact.FN & " "
& tblPrimary_Contact.LN AS Name, tblPrimary_Contact.SA,
tblPrimary_Contact.City, tblPrimary_Contact.State,
tblPrimary_Contact.ZipCode, tblPrimary_Contact.HP, tblPrimary_Contact.CP,
tblPrimary_Contact.MP, tblPrimary_Contact.WP
FROM (tblMain_File INNER JOIN tblFST ON tblMain_File.CFID = tblFST.CFID)
INNER JOIN tblPrimary_Contact ON (tblMain_File.CFID =
tblPrimary_Contact.CFID) AND (tblFST.CFID = tblPrimary_Contact.CFID)
WHERE (((tblMain_File.CFID) = [Forms]![frmNew_Client_Details]![txtCFID]))
GROUP BY tblMain_File.CFID, tblMain_File.IOD, tblMain_File.FCAD,
tblMain_File.FST, IIf([FST]<>"NACF" Or "NA","OPEN","CLOSED"), tblFST.COD,
tblFST.CM, tblFST.ARS, tblFST.CSAPP, tblFST.FAN, tblFST.FL, tblFST.FSP,
tblFST.FSTC, IIf([CID]<>"",[CID],"NOT A CLIENT"), tblPrimary_Contact.FN & "
" & tblPrimary_Contact.LN, tblPrimary_Contact.SA, tblPrimary_Contact.City,
tblPrimary_Contact.State, tblPrimary_Contact.ZipCode, tblPrimary_Contact.HP,
tblPrimary_Contact.CP, tblPrimary_Contact.MP, tblPrimary_Contact.WP;"
Thank you
-Bryan