Results 1 to 13 of 13
  1. #1
    Join Date
    Jul 2008
    Posts
    15

    Unanswered: Overflow Error when opening a report

    When I go to open one of my reports directly, I receive an Overflow error. I can open the report via a command button in one of my forms with no problem. This is extremely perplexing.

    All my values in my tables are stored as Double. The query that the report uses as its source runs fine.

    Any idea what's going on?

    Much thanks

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What's the code behind the command button look like; anything interesting happening there? (filtering, etc?)
    George
    Home | Blog

  3. #3
    Join Date
    Jul 2008
    Posts
    15
    The command is pulling up just one record of the report. Maybe that's the issue?

    Here's the code for the command:

    Code:
    Private Sub cmdPrintReport_Click()
    
    Dim strReportName As String
    Dim strCriteria As String
    
    strReportName = "Organizational Profile"
    strCriteria = "[Ultimate Parent]='" & Me![Ultimate Parent] & "'"
    DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
    
    End Sub

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I think what georgev is suggesting is the coide in the reports on opne event..not the code that calls the report

    an overflow error is usually a type conversion problem

    ..of course it could be that access is just lying and it may clear with a compact and repair on the db.

    it possible the error may occur with nulls, its possible the error could occur because you have some rogue maths statements which are not sufficently protected with error traps
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jul 2008
    Posts
    15
    There actually is no code inputted by me on the open event. The report was created via a wizard.

    I've tried compacting and repairing with no luck.

    I'm at a loss

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    What is this "Wizard" that everyone keeps talking about... is Merlin back?

    Anyway...

    Are there any subforms?

    This sounds like corruption to me. If there are no subforms and there is no code in the report itself and the query of the report runs fine then the report should open. All other errors are rendered within text boxes themselves... such as #Error or #Name?... or with an Enter Parameter Value dialog box.

    I'd recommend also trying the /decompile thing and if that fails, import all the objects into a newly created database and see if the problem disappears.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Jul 2008
    Posts
    15
    Yes there is a subform. Could this pose a problem? My next move is throwing everything in to a new database

  8. #8
    Join Date
    Jul 2008
    Posts
    15
    For what it's worth, I found the element that is causing the error. It is a calculation from the query that is referenced. I still have no idea why Access is throwing a fit over this

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is it access thats throwing a wobbler or JET
    bear in mind that JET tries the best it can to select appropriate datatypes when it does calculations.... it doesn't alwasy get it right
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Jul 2008
    Posts
    15
    How would I know if it was JET that is giving me problems?

  11. #11
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    What is the calculation in the query and how is it referenced in the report?

    BTW I asked about subforms (meaning subreports) because it could be the subreport throwing the error instead of the main report, which can be confusing.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  12. #12
    Join Date
    Jul 2008
    Posts
    15
    The query calculation is:

    APN Coverage Ratio1: ([#APN Countries1])/([#APN Countries1]+[# Non APN Countries1])

    APN Coverage Ratio1 is referenced as the control source for a text box in the report.

    Could this be a problem..... #APN Countries1 and # Non APN Countries1 are both calculations found in the same query that APN coverage ratio1 is being calculated.

    Would a query of the query be the solution?

  13. #13
    Join Date
    Jul 2008
    Posts
    15
    Ok problem solved. One record had a zero in the denominator!

    Thanks for everyone's help.

Posting Permissions

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