Hello all,
I am slowly trying to learn Access and I found this bit of code which I find completely unbelievable. Do I have to learn how to write this stuff ? Is there a tool to help me reproduce this or create this ? I'm used to VBA Excell and that makes sense to me but this !!!! What is it ???
chaine = "SELECT LOCAL, IIf(PRODUITS='3000' OR PRODUITS='7100','VOR.N','VNOIR.N') AS PRODUIT, Sum(MARGE) AS DATA INTO MOIS_VISA " & _
"FROM INP_VISA INNER JOIN CONV_LOCAL ON INP_VISA.LOCAL_INP = CONV_LOCAL.LOCAL_INP " & _
"GROUP BY CONV_LOCAL.LOCAL, IIf(PRODUITS='3000' OR PRODUITS='7100','VOR.N','VNOIR.N'), PRODUITS " & _
"HAVING Sum(MARGE) <> 0 And PRODUITS In ('0100','2000','3000','5000','7000','7100') " & _
"ORDER BY CONV_LOCAL.LOCAL, IIf(PRODUITS='3000' OR PRODUITS='7100','VOR.N','VNOIR.N')"
dbs.Execute chaine
I am slowly trying to learn Access and I found this bit of code which I find completely unbelievable. Do I have to learn how to write this stuff ? Is there a tool to help me reproduce this or create this ? I'm used to VBA Excell and that makes sense to me but this !!!! What is it ???
chaine = "SELECT LOCAL, IIf(PRODUITS='3000' OR PRODUITS='7100','VOR.N','VNOIR.N') AS PRODUIT, Sum(MARGE) AS DATA INTO MOIS_VISA " & _
"FROM INP_VISA INNER JOIN CONV_LOCAL ON INP_VISA.LOCAL_INP = CONV_LOCAL.LOCAL_INP " & _
"GROUP BY CONV_LOCAL.LOCAL, IIf(PRODUITS='3000' OR PRODUITS='7100','VOR.N','VNOIR.N'), PRODUITS " & _
"HAVING Sum(MARGE) <> 0 And PRODUITS In ('0100','2000','3000','5000','7000','7100') " & _
"ORDER BY CONV_LOCAL.LOCAL, IIf(PRODUITS='3000' OR PRODUITS='7100','VOR.N','VNOIR.N')"
dbs.Execute chaine