I get the following error on the query, but when cut and past the select
into Access, it works fine.  The problem appears to be with my Format
statements.  When I change the 3 instances to Month() it works fine.
However, I need 2-digit months for sorting purposes.  Any ideas what might
be wrong?

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Hint: The cause of this error is usually that your query contains a
reference to a field which does not exist. You should verify that the fields
included in your query exist and that you have specified their names
correctly.

SQL = "SELECT Sum([tabShippedItems].[intShippedItemsQty]) AS intQty,
Year([tabInvoice].[datInvoiceDate]) AS strYear,
Format([tabInvoice].[datInvoiceDate], "mm") AS intMonth FROM tabItemGroups
INNER JOIN (tabInvoice INNER JOIN ((tabItems INNER JOIN tabShippedItems ON
[tabItems].[strItemID]=[tabShippedItems].[strShippedItemsItemID]) INNER JOIN
tabGroupedItems ON [tabItems].[intItem_PK]=[tabGroupedItems].[intItem_PK])
ON [tabInvoice].[intInvoice_PK]=[tabShippedItems].[intInvoice_PK]) ON
[tabItemGroups].[intItemGroup_PK]=[tabGroupedItems].[intItemGroup_PK] WHERE
((([tabItemGroups].[intItemGroup_PK])=44) And
(([tabShippedItems].[bolShippedItemsDeleted])=False)) GROUP BY
Year([datInvoiceDate]), Format([tabInvoice].[datInvoiceDate], "mm") ORDER BY
Format([tabInvoice].[datInvoiceDate], "mm"), Year([datInvoiceDate]) DESC;"

Data Source = "OMGSECUREV1"



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to