This Expression is to Complex

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmartin1986
    New Member
    • Sep 2007
    • 37

    #1

    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.
    Code:
    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]
    FROM [tbl-tag_master]
    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])));
    Any help would be great!!


    Thanks,
    Chad
  • cmartin1986
    New Member
    • Sep 2007
    • 37

    #2
    bump........... ...........

    Comment

    • cmartin1986
      New Member
      • Sep 2007
      • 37

      #3
      anyone????????? ????????

      Comment

      • jaxjagfan
        Recognized Expert Contributor
        • Dec 2007
        • 254

        #4
        Originally posted by cmartin1986
        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.
        Code:
        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]
        FROM [tbl-tag_master]
        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])));
        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?

        Comment

        • cmartin1986
          New Member
          • Sep 2007
          • 37

          #5
          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.

          Comment

          Working...