• Overflow Message Running Query

    Author
    Topic
    #356187

    I have a totals query that has an expression which is somewhat complex. I am attempting to derive the previous salary or hourly rate of employees based upon their current salary/rate and the percent change from the previous salary/rate. Here is the expression:

    Prior Salary: First(IIf([EecSalaryOrHourly]=’S’,[qselLastSalaryChange]![EjhASalary]/(1+([qselLastSalaryChange]![EjhPctChange]/100)),([qselLastSalaryChange]![EjhHPayRate]/(1+([qselLastSalaryChange]![EjhPctChange]/100)))))

    When I try to run this I get a message that simply says “Overflow” and nothing else. The “Help” button is grayed out. I “borrowed” this expression from another db where I am told it works fine. The source of the data is from pass through SQL queries. Any help appreciated.

    Viewing 0 reply threads
    Author
    Replies
    • #526692

      I’ve had this, but was a while ago. What I can remember is that there were a couple of records that were not completely entered, then when a query tried to do any calculation on a set of records, I’d get the ‘overflow’ message. So I’m afraid you’ll have to check out that the appropriate records have all the relevant records, but it may be difficult to use a query to find them as the piggin’ ‘overflow’ gets in the way!

      Hope that helps.

      • #526714

        This message means one of two things: either there truly is an overflow because you tried to stuff, say, a double into an integer field, or you tried to do something like divide by zero or perform a calculation on a null value.

        There is no easy fix. You must look at the data and find the guilty records and fix them. However, it might be simplest to do a straight select query on the fields you’re using in calculations and sort on them, one at a time, to see if there are any null or zero values.

        • #526891

          Thanks Charlotte! The funny thing is I went back and changed the record source from pass through queries to linked tables and it worked – same expression and everything.

    Viewing 0 reply threads
    Reply To: Overflow Message Running Query

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: