Sorry my Name are in french...
but the 3 fields that I need are in bold and the first is the 1st calculated field and the second is another calculated field that return me #Error instead of 0 and the Iff isn't there since I hade problem with it, query wouldn't work with it
again sorry for the french
those are the 2 that cause a problem
Revient_Prevu = Profit
Prix_de_vente = Price_Sold
[Prix_de_Vente]-[Coût_Stock]-[Coût_Commandes]-[Coût_Mod]-[Coût_Commission] AS Revient_Prevu, ([Revient_Prevu]/[Prix_de_vente]) AS Profit_Prévu
Code:
SELECT Tbl_Soumission.No_Job_auto, Tbl_Soumission.No_Job, Tbl_Soumission.No_Client, Tbl_Soumission.Nom_Job, Tbl_Soumission.No_Type, Tbl_Soumission.No_Peinture, Tbl_Soumission.Cause, Tbl_Soumission.Prix_de_vente, Tbl_Production.Date_Produite, Tbl_Commande.Coût_Stock, Tbl_Commande.Coût_Commande, Tbl_Client.[Commission%], Tbl_Commande.Temps_Ebenisterie AS TE, Tbl_Commande.Temps_Ligne AS TL, Tbl_Commande.Temps_Peinture AS TP, Tbl_Commande.Temps_Ligne_Couleur AS TLC, Val([Temps_Ebenisterie])+Val([Temps_Ligne])+Val([Temps_Peinture])+Val([Temps_Ligne_Couleur]) AS Temps_Prévus, [Prix_de_Vente]-[Coût_Stock]-[Coût_Commandes]-[Coût_Mod]-[Coût_Commission] AS Revient_Prevu, ([Revient_Prevu]/[Prix_de_vente]) AS Profit_Prévu, [Coût_Commande]-[Coût_Stock] AS Coût_Commandes, ([Commission%]*[Prix_de_Vente])/100 AS Coût_Commission, [Temps_Prévus]*60 AS Coût_MOD, Tbl_Soumission.Job_Confirmee, Tbl_Soumission.No_Etat
FROM (Tbl_Client INNER JOIN Tbl_Soumission ON Tbl_Client.No_Client = Tbl_Soumission.No_Client) INNER JOIN (Tbl_Production INNER JOIN Tbl_Commande ON Tbl_Production.No_Soumission_Auto = Tbl_Commande.No_Soumission_Auto) ON Tbl_Soumission.No_Job_auto = Tbl_Commande.No_Soumission_Auto
WHERE (((Tbl_Soumission.Job_Confirmee) Is Not Null) AND ((Tbl_Soumission.No_Etat)=6 Or (Tbl_Soumission.No_Etat)=7 Or (Tbl_Soumission.No_Etat)=12));