troubleshooting Question

Query OK in Access 2000 and not in Access 2007

Avatar of schmir1
schmir1Flag for United States of America asked on
16 Comments1 Solution171 ViewsLast Modified:
In the code section below is a query that works in Access 2000 but not in Access 2007.  The following part (from line 1 of code section) is where the error is:

GrandTotal: Format(DSum("[Price_Per_Unit]*[Quantity]","[OrdersTotal_Subquery]","[Project_Num] = Forms![BOM_Queries]![cboProjects]  "),"$#.00")
SELECT Orders.Project_Num, Orders_Subtable.Component_Num, Orders_Subtable.Quantity, Orders_Subtable.Price_Per_Unit, Sum([Price_Per_Unit]*[Quantity]) AS Total, Format(DSum("[Price_Per_Unit]*[Quantity]","[OrdersTotal_Subquery]","[Project_Num] = Forms![BOM_Queries]![cboProjects]  "),"$#.00") AS GrandTotal
FROM Orders INNER JOIN Orders_Subtable ON Orders.Orders_ID = Orders_Subtable.Orders_ID
GROUP BY Orders.Project_Num, Orders_Subtable.Component_Num, Orders_Subtable.Quantity, Orders_Subtable.Price_Per_Unit, Format(DSum("[Price_Per_Unit]*[Quantity]","[OrdersTotal_Subquery]","[Project_Num] = Forms![BOM_Queries]![cboProjects]  "),"$#.00")
HAVING (((Orders.Project_Num)=[Forms]![BOM_Queries]![cboProjects]));

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros