473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

This Expression is to Complex

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
4 1656
bump......................
Jan 9 '08 #2
anyone?????????????????
Jan 17 '08 #3
jaxjagfan
254 Expert 100+
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
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

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

Similar topics

39
by: | last post by:
I am trying to run the following agregate function in a parameterized query on Access2000: Min(.*sqr(./.)/) The query saved OK, but an attempt to run it results in the message: The expression...
5
by: Bob Stearns | last post by:
Is there an easy way (without duplication of the complex expression) to use the same complex expression in all three places? Will something like this work? WITH (SELECT t.*, <complex expr> AS...
1
by: Terencetrent | last post by:
I am trying to format a query expression drawn from a dialog box as percent. The original statement to get the value for the query is as follows: New%markup: !! The dialog box looks the...
8
by: - | last post by:
Hi to All, To reproduce: The expression: object result = flag ? (long) 0 : (double) 0; always evaluated as a double... see dissassembly to ensure the bad compiled code.
3
by: Joe | last post by:
Hi, I have been using a regular expression that I don’t uite understand to filter the valid email address. My regular expression is as follows: <asp:RegularExpressionValidator...
13
by: Vij | last post by:
is there a cross platform (msvc, gcc and solaris CC) simple regex library available? All we need is a simple lib that will do string matching, nothing too complex.
6
by: Jon Paal | last post by:
what is vb equiv. of ++ shown in C# ?
6
by: jonny | last post by:
I am new to web design and programming and was wonder which of these two would be better to invest my time to learn. Visual Web Developer 2005 vs. Microsoft Expression. I would like to make...
14
by: Nick Maclaren | last post by:
For reasons that I won't explain, as they are too complicated and not terribly relevant, I am interested in discovering what people actually use regular expressions for. Not the subject domain,...
1
by: Anderson | last post by:
Hi! I´m using a OleDbDataAdapter to fill my DataSet object, and to do the database update work the OleDbCommandBuilder class. But, when I call the OleDbDataAdapter.Update(DataSet) method VB...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.