Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when i sort query in decending order but none when not sorted?

Status
Not open for further replies.

KaayJaay

IS-IT--Management
Jul 6, 2004
64
US
I get an error message that says, "This expression is typed incorrectly, or it is too complelx to be evaluated. For example a numberic expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

I dont understand why this is happening.

Thanx
KaayJaay
 
when you add a sort to a query, it adds more stuff onto the sql string used for that query...

either you are writing the sort wrong, or your query is very complicated, and adding the sort just puts it over the top for being too complicated...

how's about posting the sql for that query...
 
SELECT [Total Installation Repeats].MU AS MU, Count([Total Installation Repeats].[Disposition Code]) AS Count, Sum([Tech_Data Query].DO) AS Volume, Count([Total Installation Repeats].[Disposition Code])/Sum([Tech_Data Query].[DO]) AS Percentage, [Total Installation Repeats].[Close Date]
FROM [Total Installation Repeats] INNER JOIN [Tech_Data Query] ON ([Total Installation Repeats].MU = [Tech_Data Query].MU) AND ([Total Installation Repeats].[Tech#] = [Tech_Data Query].[Tech#])
GROUP BY [Total Installation Repeats].MU, [Total Installation Repeats].[Close Date], [Total Installation Repeats].MT
HAVING ((([Total Installation Repeats].[Close Date]) Between [Forms]![Repeats Interface]![Start] And [Forms]![Repeats Interface]![End]) AND (([Total Installation Repeats].MT)=[Please enter MT]))
ORDER BY [Total Installation Repeats].MU, [Total Installation Repeats].[Close Date];
 
Hi, One thing jumps out: Count is probably a reserved word. It looks like you are naming the query field as Count. Try changing the name:

Count([Total Installation Repeats].[Disposition Code]) AS CountTDR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top