Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have several new reports that when I activate the report the VBA editor opens several minutes later. Why would that happen? Thank you. Fay

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Do the reports have code in them?

    When the VBA Editor opens, does it go to anywhere in particular and highlight any line of code?

    If the VBA Editor opens I would expect that to mean that there is some problem with code.
    Regards
    John



  3. #3
    New Lounger
    Join Date
    Dec 2009
    Location
    Birmingham, Alabama, USA
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Back your database up first.

    Next thing to do, open the VBA editor and Clear All Breakpoints (CTRL+SHIFT+F9). Now compile your application(Debug>Compile). Assuming you've got Option Explicit set and declared all variables properly, it should compile.

    Run a Compact and Repair (depends on the Access version where you find this - use Help if not sure).

    If your application is still hinky, then try a decompile. From the command line or from Start Menu, Run use
    "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "D:\My Documents\Path To My Database\MyDatabase.mdb" /decompile

    (Note if there's a space in either path, you must use quotes. Replace with your actual paths, of course.)

    Now do another Compact and Repair, then finally Compile again, and do a final Compact and Repair.

    If that hasn't fixed it, then create a fresh database, and import all your objects into it.

    If that hasn't fixed it, you'll have to rebuild the report. Save the old version with a new name so you have it for reference.

    Good luck.

Posting Permissions

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