millhouse123
Active Member
- Joined
- Aug 22, 2006
- Messages
- 335
I have two queries that are almost identical and I can't figure out why I get an error on one of them.
the working query
SELECT qry_final_CMS_incentives_by_line_item.*
FROM qry_final_CMS_incentives_by_line_item
WHERE (((IIf([TempVars]![varIncentiveTo]=[IncentiveTo],True,False))=True));
The non working query -
SELECT qry_final_CMS_incentives_by_month_totals.*
FROM qry_final_CMS_incentives_by_month_totals
WHERE (((IIf([TempVars]![varIncentiveTo]=[IncentiveTo],True,False))=True));
When I remove the WHERE clause from the second it works fine. The error I get is "This expression is typed incorrectly, or it is too complex to be evaluated."
Any advice would be very much appreciated.
the working query
SELECT qry_final_CMS_incentives_by_line_item.*
FROM qry_final_CMS_incentives_by_line_item
WHERE (((IIf([TempVars]![varIncentiveTo]=[IncentiveTo],True,False))=True));
The non working query -
SELECT qry_final_CMS_incentives_by_month_totals.*
FROM qry_final_CMS_incentives_by_month_totals
WHERE (((IIf([TempVars]![varIncentiveTo]=[IncentiveTo],True,False))=True));
When I remove the WHERE clause from the second it works fine. The error I get is "This expression is typed incorrectly, or it is too complex to be evaluated."
Any advice would be very much appreciated.