Results 1 to 9 of 9
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    A workmate gets the following error when opening an Acces 2007 database.

    Reserved Error (-1524); there is no messagefor this error.

    The Service Pack of Office 2007 on his computer is SP1.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Reserved error (-1524); there is no message for this error. in another discussion group suggests that a corrupt record might be the cause.

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='HansV' post='784288' date='13-Jul-2009 16:56']Reserved error (-1524); there is no message for this error. in another discussion group suggests that a corrupt record might be the cause.[/quote]
    I saw that, there are others that suggest that the registry is corrupt.
    I will set a breakpoint and step thru and see what it fails on.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='HansV' post='784288' date='13-Jul-2009 16:56']Reserved error (-1524); there is no message for this error. in another discussion group suggests that a corrupt record might be the cause.[/quote]
    It bombs on an Append query.
    This database works well in Access 2003.
    Any more clues?

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    So it is not a 2007 database?
    It is an earlier version db being opened in 2007.

    Try decompiling and recompiling.
    Open with a shortcut with the /decompile switch.
    Regards
    John



  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='johnhutchison' post='785018' date='17-Jul-2009 17:26']So it is not a 2007 database?
    It is an earlier version db being opened in 2007.

    Try decompiling and recompiling.
    Open with a shortcut with the /decompile switch.[/quote]
    That didn't work John, where is the startup window?

    I need to set it so nothing starts automatically.

    What happens when you decompile, it just seems to do the same thing and start the database.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can bypass the startup options by holding down Shift while opening the database.
    To change the startup options:
    - Click the Office button.
    - Select Access Options...
    - Click Current Database in the navigation pane on the left hand side.
    - The startup form is specified in the "Display Form" dropdown in the Application Options section.

    The first time you run VBA code, the VBA engine creates a "compiled" version of the source code; this is stored in the database along with the source code (text). Sometimes, this compiled version becomes corrupt.
    Opening the database with the /Decompile switch deletes all compiled code from the database, forcing the VBA engine to recompile it next time the code is run (or when you select Debug | Compile <projectname> in the Visual Basic Editor).

    Since you cannot see the compiled version of the code, opening a database with the /Decompile switch has no visible effect. But you can notice the difference as follows:

    - In the Visual Basic Editor, select Debug | Compile <projectname>
    - Close the database.
    - Open the database with the /Compact switch. Access will compact and close the database.
    - Note the size of the database file.
    - Open the database with the /Decompile switch; suppress startup options by holding down Shift.
    - Close the database.
    - Open the database with the /Compact switch.
    - Note the size of the database file. It should be smaller now.

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='HansV' post='785051' date='17-Jul-2009 21:46']You can bypass the startup options by holding down Shift while opening the database.
    To change the startup options:
    - Click the Office button.
    - Select Access Options...
    - Click Current Database in the navigation pane on the left hand side.
    - The startup form is specified in the "Display Form" dropdown in the Application Options section.

    The first time you run VBA code, the VBA engine creates a "compiled" version of the source code; this is stored in the database along with the source code (text). Sometimes, this compiled version becomes corrupt.
    Opening the database with the /Decompile switch deletes all compiled code from the database, forcing the VBA engine to recompile it next time the code is run (or when you select Debug | Compile <projectname> in the Visual Basic Editor).

    Since you cannot see the compiled version of the code, opening a database with the /Decompile switch has no visible effect. But you can notice the difference as follows:

    - In the Visual Basic Editor, select Debug | Compile <projectname>
    - Close the database.
    - Open the database with the /Compact switch. Access will compact and close the database.
    - Note the size of the database file.
    - Open the database with the /Decompile switch; suppress startup options by holding down Shift.
    - Close the database.
    - Open the database with the /Compact switch.
    - Note the size of the database file. It should be smaller now.[/quote]
    Thanks Hans, I have been trying to find the corrupt record(s) and have found the first one.
    I will write a loop in VBA code to read and insert 1 record at a time. I will keep where i am up to in another table so i can start from the one after the record that failed.
    I hope there aren'ttoo many.
    I may read and append these records to another table if i can.

  9. #9
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    I found it, there was 1 record with 4 chr(0) characters in a particular field.

    I created a query to update that field using replace of chr(0) to "".

    I hate those problems, even though they are a challenge. I love the challenge so i guess i cant hate it too much.

Posting Permissions

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