Results 1 to 6 of 6

Thread: Error Message

  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: Error Message

    Hi

    I have set up a query that returns a report of the information between certain dates.

    I have set up the criteria as "Between [**/**/****:] And [**/**/****]" which prompts you for the dates and it used to work but as records have been entered i have started getting the following error

    "the expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables"

    Any thoughts on what i need to do to fix it!?!? why did it used to work but suddenly stop?

    i would be greatful for any help on this...

  2. #2
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    I have had this before and the query was working fine then all of a sudden it stopped working.

    I used repair database function, as advised (under tools/database utilities) and that didnt solve it. Try that first anyway.

    However, if I recreated the query exaclty the same it worked !?

    How about trying to copy the 'sql' bit, and make a new query by pasting it.

    Its not the idea solution, its just a suggestion.

    Finally has anything changed since this query worked ? Anyone else altered formats ?

    ~Ken

  3. #3
    Join Date
    Mar 2004
    Posts
    3
    Hi Ken

    Thanks for the below suggestions :

    I tried the repair database function, and as you predicted it didn't work!

    I have recreated the query, and while I am within the design view of the query it works, but when I go to preview the report generated by the query, I can input the same dates etc, but that's when I get the error!

    I presume this is a problem with the report??

    what are your thoughts?

    apologies, about this, I am a little new when it comes to access, and I am probably trying to bite off more than I can chew with these queries!

    what do you mean when you say copy and paste the SQL to make a new query?

    Diziet

  4. #4
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: Error Message

    Originally posted by Diziet
    I have set up the criteria as "Between [**/**/****:] And [**/**/****]" which prompts you for the dates and it used to work but as records have been entered i have started getting the following error
    Try to change your condition to
    "Between [StartDate] And [EndDate]"

    and test the query directly.
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  5. #5
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    When you are designing a query, you need the 'design query' toolbar selected. There is an icon that toggles between, Design,View and SQL.

    If you create a query, you can toggle to see the sqlstring you have created ! It comes in handy sometimes if you want to use a sql string for something.

    DoktorBlue looks like he has a better solution, try that !

    Regards

    Ken

  6. #6
    Join Date
    Mar 2004
    Posts
    3
    Hmmm

    tried all your options, but the problem seems to occur because I have calculations in the group footer of my report.

    If I remove them it works fine, but the whole point of the report is to have monthly totals for each field!!!!

    Is there any way I can work the SUM calculation of several of the fields into the query so that it automatically adds the contents of the fields when the query is run and the report generated??

    Any thoughts?

    Diziet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •