By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,862 Members | 868 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,862 IT Pros & Developers. It's quick & easy.

This Expression is to Complex

P: 37
I am trying to write a sql query to return a count of records from a user defined supplier in weekly buckets going back from a user defined date. I get an error saying "This expression is typed incorrectly or it is too complex to be evaluated...." When I orginally wrote this it would simply start from Date() and go back weekly and still had a user defined supplier. What i did was add a combo box to my "front" form for a user input date, at which point I started getting the error.

Here is a section of my code.
Expand|Select|Wrap|Line Numbers
  1. SELECT "8 Weeks Ago" as Week, Count([tbl-tag_master].[Received Date]) AS [CountOfReceived Date], Count([tbl-tag_master].[resub recived date]) AS [Count of Resub]
  2. FROM [tbl-tag_master]
  3. WHERE (((([tbl-tag_master].[Received Date]) Between ([forms]![front]![combo8]-56) And ([forms]![front]![combo8]-49))) and (([tbl-tag_master].[supplier]) like ([forms]![front]![combo12])));
  4.  
Any help would be great!!


Thanks,
Chad
Jan 9 '08 #1
Share this Question
Share on Google+
4 Replies


P: 37
bump......................
Jan 9 '08 #2

P: 37
anyone?????????????????
Jan 17 '08 #3

jaxjagfan
Expert 100+
P: 254
I am trying to write a sql query to return a count of records from a user defined supplier in weekly buckets going back from a user defined date. I get an error saying "This expression is typed incorrectly or it is too complex to be evaluated...." When I orginally wrote this it would simply start from Date() and go back weekly and still had a user defined supplier. What i did was add a combo box to my "front" form for a user input date, at which point I started getting the error.

Here is a section of my code.
Expand|Select|Wrap|Line Numbers
  1. SELECT "8 Weeks Ago" as Week, Count([tbl-tag_master].[Received Date]) AS [CountOfReceived Date], Count([tbl-tag_master].[resub recived date]) AS [Count of Resub]
  2. FROM [tbl-tag_master]
  3. WHERE (((([tbl-tag_master].[Received Date]) Between ([forms]![front]![combo8]-56) And ([forms]![front]![combo8]-49))) and (([tbl-tag_master].[supplier]) like ([forms]![front]![combo12])));
  4.  
Any help would be great!!


Thanks,
Chad
Go back and take a look at your criteria. Make a copy of the query and try it with just the "supplier" criteria and then with just the "received date" criteria. This will help you find where the problem is. When I view the queries in SQL View I remove most of the bracketing so its easier to troubleshoot.

Are you returning these values in the form, a subform or report? Did you think about using a DCount for this?
Jan 17 '08 #4

P: 37
I am using it in a form. I have tried to narrow it down all my criteria seems to work seperatly but when i put them all together i get the too complex thing. Is it really too complex? That seems hard to believe. Again i am thankful for any help.
Jan 18 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.