Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Feb 2003
    Location
    DC Metro, District Of Columbia, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    recompile? (2002 sp-1)

    I get this error msg when I try to convert a 97 file to the 2000 (default) version --> Make sure the code in your database is compiled. Renaming a database decompiles the code in it so recompile your code if you rename the database <-- Soooooo, I tried to find the compile/recompile menu item / toolbar icon / whatever, and, to no great surprise, I cannot find this elusive compile/ recompile option/ command/ whatever. The help file is not any, surprise! Please enlighten me as to how to compile/ recompile a database. I used Access 97 in an earlier lifetime and am now compelled by my new work environment to transition and use Access 2002. I murkily recall a bang button I clicked on to run a query, but do not recall a database compile command or option. Oh, did I mention I had successfully avoided Access since 99 <grin>? You can run and hide, but, it'll find you anywhere!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: recompile? (2002 sp-1)

    Try this first: create a new blank database in Access 2002 and import all database objects from the Access 97 database. If you succceed, you will have to set startup options manually. If not, read on.

    Can you convert the database to Access 2000 format at all, despite the error message?

    If so, with the database open, activate the Visual Basic Editor (Alt+F11).
    Select Debug | Compile <projectname>. (I hope you don't get an error message now. If so, try to repair things if you can. Otherwise, post back and tell us what it said.)
    Back in Access, select Tools | Database Utilities | Compact and Repair.

    If you can't convert the database to Access 2000 format, you will have to open the database in Access 97.
    Open any module, then select Debug | Compile and Save All Modules. (Again, if you get an error message, try to solve it if you can, otherwise post back.)
    Close the module.
    Then, select Tools | Database Utilities | Compact Database.
    Quit Access 97 and transfer the database to a machine with Access 2002. Try to convert again.

    Good luck!

  3. #3
    Star Lounger
    Join Date
    Feb 2003
    Location
    DC Metro, District Of Columbia, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: recompile? (2002 sp-1)

    Ok,,,, import went well, mostly. From conversion error table:
    Object Type Object Name Error Description
    Database Missing or broken VBE reference to the file 'dao2535.tlb'.
    Module "There were compilation errors during the conversion or enabling of this database.@This might be due to old DAO syntax that is no longer supported. For an example on how to fixup the code, click Help. @@2@611705@1"
    Module There were compilation errors during the conversion or enabling of this database.
    **************
    Went to VBE/tools/refs/ removed the 'MISSING: DAO something 2.5/3.5 something.
    Did the debug/compile. Error: Private Function RecurseTable(U, UnitTable As Recordset) As Double
    This is on the three modules I tried to compile.
    Closed VBE.
    From main menu: tools/utilities/compact and repair. Error: On Open event property setting...user defined type not..
    The tables, queries, and modules seem to be intact? the form unit also does the on open error.

  4. #4
    Star Lounger
    Join Date
    Feb 2003
    Location
    DC Metro, District Of Columbia, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: recompile? (2002 sp-1)

    You said if it does not work to post back. Well, I am ignoring that cuz It Works!!!!!!!! 10 Q 4 ur help! jl.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: recompile? (2002 sp-1)

    Thanks for the clear description. You did well to remove the missing reference.

    I think that the following will cure the remaining problems:
    <UL><LI>In the Visual Basic Editor, select Tools/References... again.
    <LI>Uncheck (remove) the reference to the Microsoft ActiveX Data Objects 2.n Library.
    <LI>Check (add) a reference to the Microsoft DAO 3.6 Object Library.[/list]Explanation: in Access 97, DAO (Data Access Objects) was the default data object model used to manipulate recordsets in code. Although DAO still works in Access 2000 and 2002, the default data object model in these versions is ADO (ActiveX Data Objects). There are some objects of the same name in both models, such as Recordset and Field, but they have slightly different properties and methods. By removing the reference to ADO and adding one to DAO, you enable the database to work with the 'old' code.

    I hope this will work for you. If not, post back.

Posting Permissions

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