Parameter Query breaks with 'Too Complex' Error when paraemter uses wildcard asterisk (1 Viewer)

Margarita

Registered User.
Local time
Today, 08:42
Joined
Aug 12, 2011
Messages
185
Hello,
I am in Access 2003. I have a select query which started exhibiting strange behavior last night (worked without any problems for months up until this point). This is a query which selects payment data- how much someone got paid for a certain task.
It has several parameters- four date parameters, and two text parameters. These parameters are inherited from the query's subqueries. One of the parameters is the task. Sometimes I want to select data only for one specific task, in which case I type in the exact name of the task. But sometimes I want to search for a group of tasks, like Management of Sales, Management of Purchasing, etc. In this case, I was to be able to type in "Management*" into the parameter. I used to be able to do this without a problem.
As of yesterday, this does NOT work. When I type in exact task names one by one, it works- get correct data. When I try it with an asterisk, I get an error message 'the expression is typed incorrectly or is too complex...'
What could be causing this? I don't know what I did to it to make it go insane. I used that query once yesterday morning without a problem, then went on to working on other stuff in the database which have nothing to do with that query, and when I had to use it again in the afternoon, I started seeing this weird behavior. Has anyone ever had to deal with something like this? What could have caused my query to develop this asterisk allergy?
The query is below:

PHP:
SELECT UCase(MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.LastName) & ", " & UCase(MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.FirstName) AS Name, M.ROLE, CCur([Month's Salary]) AS [Total Salary], Sum(M.FTE) AS [Total FTE], CCur(Sum(SalperTask)) AS [Total Paid], CCur(Sum(FringeperTask)) AS [Total Fringe], ([Total Paid]+[Total Fringe]) AS TOTAL
 
FROM 
(Select ServiceCat, MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.LastName, 
MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.FirstName, ROLE, FTE, [Month's Salary], SalperTask, FringeperTask
from 
MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields inner join SERVICES on 
MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.ServiceSubcat= SERVICES.ServiceSubcat
where SERVICES.ServiceCat like [servcat] and
MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.OTType like [ott]) AS M
 
GROUP BY M.ROLE, MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.LastName, MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.FirstName, M.[Month's Salary]
ORDER BY MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.LastName, MonthlySalary_FinalQuery_TASK_TOTALSoriginalfields.FirstName;

Thank you!
 

Margarita

Registered User.
Local time
Today, 08:42
Joined
Aug 12, 2011
Messages
185
Hello, just to follow up on this, I went ahead and tried wildcards with other queries and there is no problem there- I get good data there. Also, I don't have any problems searching with an asterisk in a table.
Re-creating the query from scratch in a new query window doesn't help- it gets stuck with the same error again.
Also tried storing the subquery in the from clause of this query as a separate query and referencing it in the main query by name. That does nothing.
Compact/repair does nothing.

I'll keep investigating and will post back here for reference for anyone having the same problem.

Thanks.
 

Users who are viewing this thread

Top Bottom