M
Marc Robillard
Hi All, If I run that into a new query in Access All goes good,
SELECT BillDetails.Bill_id, Bill.Bill_Date, Orders.Ord_id, Orders.Ord_Date,
Bill.Bill_DepositUsed, Bill.Bill_TransportUsed, Orders.TaxesGroup_id,
Devise.Devise_Symbol,
Format(Switch(orders.taxesGroup_id=1,[TotaltpsTvq],orders.taxesGroup_id=2,[TotalTva],orders.taxesGroup_id=3,[TotalNoTaxes],orders.taxesGroup_id=4,[TotalTPS]),"Standard")
AS GrandTotal, BillPayments.TotalPayment, TaxesGroup.Taxes_LongDesc_fr AS
Taxes, Customer.Cst_Name
FROM TaxesGroup INNER JOIN ((Devise INNER JOIN (Customer INNER JOIN Orders
ON Customer.cst_id=Orders.Cst_id) ON Devise.Devise_id=Orders.Devise_id)
INNER JOIN ((((((Bill INNER JOIN BillTotalCanQue ON
Bill.Bill_id=BillTotalCanQue.Bill_id) INNER JOIN BillTotalTVA ON
Bill.Bill_id=BillTotalTVA.Bill_id) INNER JOIN BillTotalNoTaxe ON
Bill.Bill_id=BillTotalNoTaxe.Bill_id) INNER JOIN BilltotalTPS ON
Bill.Bill_id=BilltotalTPS.Bill_id) INNER JOIN BillPayments ON
Bill.Bill_id=BillPayments.Bill_id) INNER JOIN BillDetails ON
Bill.Bill_id=BillDetails.Bill_id) ON Orders.Ord_id=Bill.Ord_id) ON
TaxesGroup.TaxesGroup_ID=Orders.TaxesGroup_id
WHERE (Orders.cst_id = 1)
GROUP BY BillDetails.Bill_id, Bill.Bill_Date, Orders.Ord_id,
Orders.Ord_Date, Bill.Bill_DepositUsed, Bill.Bill_TransportUsed,
Orders.TaxesGroup_id, Devise.Devise_Symbol,
Format(Switch(orders.taxesGroup_id=1,[TotaltpsTvq],orders.taxesGroup_id=2,[TotalTva],orders.taxesGroup_id=3,[TotalNoTaxes],orders.taxesGroup_id=4,[TotalTPS]),"Standard"),
BillPayments.TotalPayment, TaxesGroup.Taxes_LongDesc_fr, Customer.Cst_Name,
BillTotalCanQue.TotaltpsTvq, BillTotalTVA.TotalTva,
BillTotalNoTaxe.TotalNoTaxes, BilltotalTPS.TotalTPS;
But I use VB6 with ADO : here is the messages error: using exactly the same
query.
Run-time error '-2147217904 (80040e10)':
[Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 1.
I simply don't get it.
SELECT BillDetails.Bill_id, Bill.Bill_Date, Orders.Ord_id, Orders.Ord_Date,
Bill.Bill_DepositUsed, Bill.Bill_TransportUsed, Orders.TaxesGroup_id,
Devise.Devise_Symbol,
Format(Switch(orders.taxesGroup_id=1,[TotaltpsTvq],orders.taxesGroup_id=2,[TotalTva],orders.taxesGroup_id=3,[TotalNoTaxes],orders.taxesGroup_id=4,[TotalTPS]),"Standard")
AS GrandTotal, BillPayments.TotalPayment, TaxesGroup.Taxes_LongDesc_fr AS
Taxes, Customer.Cst_Name
FROM TaxesGroup INNER JOIN ((Devise INNER JOIN (Customer INNER JOIN Orders
ON Customer.cst_id=Orders.Cst_id) ON Devise.Devise_id=Orders.Devise_id)
INNER JOIN ((((((Bill INNER JOIN BillTotalCanQue ON
Bill.Bill_id=BillTotalCanQue.Bill_id) INNER JOIN BillTotalTVA ON
Bill.Bill_id=BillTotalTVA.Bill_id) INNER JOIN BillTotalNoTaxe ON
Bill.Bill_id=BillTotalNoTaxe.Bill_id) INNER JOIN BilltotalTPS ON
Bill.Bill_id=BilltotalTPS.Bill_id) INNER JOIN BillPayments ON
Bill.Bill_id=BillPayments.Bill_id) INNER JOIN BillDetails ON
Bill.Bill_id=BillDetails.Bill_id) ON Orders.Ord_id=Bill.Ord_id) ON
TaxesGroup.TaxesGroup_ID=Orders.TaxesGroup_id
WHERE (Orders.cst_id = 1)
GROUP BY BillDetails.Bill_id, Bill.Bill_Date, Orders.Ord_id,
Orders.Ord_Date, Bill.Bill_DepositUsed, Bill.Bill_TransportUsed,
Orders.TaxesGroup_id, Devise.Devise_Symbol,
Format(Switch(orders.taxesGroup_id=1,[TotaltpsTvq],orders.taxesGroup_id=2,[TotalTva],orders.taxesGroup_id=3,[TotalNoTaxes],orders.taxesGroup_id=4,[TotalTPS]),"Standard"),
BillPayments.TotalPayment, TaxesGroup.Taxes_LongDesc_fr, Customer.Cst_Name,
BillTotalCanQue.TotaltpsTvq, BillTotalTVA.TotalTva,
BillTotalNoTaxe.TotalNoTaxes, BilltotalTPS.TotalTPS;
But I use VB6 with ADO : here is the messages error: using exactly the same
query.
Run-time error '-2147217904 (80040e10)':
[Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 1.
I simply don't get it.