• Calculated Field (Access 2000)

    Author
    Topic
    #447601

    Greetings all:

    I have a report that is sorted by a calculated field that contains Total Hours Worked (major key) and an In Class Date field (Minor Key). On the report, the total hours worked field shows 0.0 and the dates for this figure are not sorted properly. Upon further inspection of the query results that the report is based on, one of the Total Hours Worked field actually shows 1.13686837721616E-13. In fact, all the supposedly 0.0 fields show this kind of scientific notation. The calculated field is formated to standard number with one decimal place. What am I missing? As always, all assistance is greatly appreciated. TIA.

    Viewing 0 reply threads
    Author
    Replies
    • #1092140

      You probably calculate hours worked by adding some figures together, then subtracting something else. Small rounding errors can occur when you do this, because the numbers involved cannot be stored with infinite precision. You could use a formula like this to round the results to 1 decimal place:

      Int(10 * [Hours]) / 10

      where Hours is the value you want to round.

      • #1092157

        Thanks Hans,

        I’ll have to wait until Monday to try this but it looks good. I’ll let you and the forum know the results

    Viewing 0 reply threads
    Reply To: Calculated Field (Access 2000)

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

    Your information: