Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access97 to 2000 conversion (2000 - 9.0.4402 SR-1)

    Having problems with an inherited 97 DB. I am getting "The Visual Basic for Applications project in the database is corrupt." message box when trying to convert to 2000. Upon clicking ok the conversion stops and bombs out. The VB elements seem to be embedded in the forms and if I try to import these directly into a blank 2000 DB get the same message for each affected form. The tables, queries, reports and macros come in ok.

    Any thoughts? I don't have 97 so looking at how the forms work is a bit tricky.

    Cheers.

    Niven <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access97 to 2000 conversion (2000 - 9.0.4402 SR-1)

    Hmmm - that's a challenge I'm afraid. It does sound as though there is corruption of some sort in the database. There is a stand-alone tool JetComp.exe you can download to attempt to compact and repair a Jet 3.5 database, so that might be a possibility, but it appears you really need to have Office 97 installed - see <!mskb=184582>Microsoft Knowledge Base Article 184582<!/mskb>. Can you open the database in 97 mode and have it work? If so you might try exporting each of the forms to another database. It has to be done one at a time, so it's tedious compared to importing to a new database, but I've seen that work in some cases. Otherwise, I'd start looking for a copy of Access 97.
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access97 to 2000 conversion (2000 - 9.0.4402 SR-1)

    Sorry, been awhile since I've been able to pick this up. Many thanks your reply, I have got quite a long way down the line with this now and have been able to import all the objects into 2000, (not without problems I hasten to add). One big help was setting the Access 2000 references to Microsoft DAO 3.6 Object Library database.

    However, and I'll set this up as a new post if you want, I have a problem opening several of the forms. There is a piece of VB I'm not familiar with, (which works ok under Access97), which is throwing up a Run-time error '13' Type mismatch. The code in question is to do with Recordsets, i.e the OpenRecordset function and the RecordsetClone function. Do you know of any differences between 97 and 2000 relating to this and I know it's vague from what I've presented here, but do you have any suggestions?

    Cheers,

    Niven

  4. #4
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access97 to 2000 conversion (2000 - 9.0.4402 SR-1)

    Hi, I had the same problem when I did a frontend database, I had to do one in 97 and one in XP.

    The code is slightly different in places, Recordsets being one of them, but it should be easy to fix.

    97 uses Recordset.Clone, whereas XP uses RecordsetClone, if you replace the code that doesnt compile with the new syntax all should be ok.
    Again with the OpenRecordset ...

    Dim rst As Recordset
    rst.Open(...)

    If you go to the object browser it should show you the format of this and other commands, alternatively type recordset. and 'Clone' should appear in the list of methods etc.

    Any help?
    Thanks,

    pmatz

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

    Re: Access97 to 2000 conversion (2000 - 9.0.4402 SR-1)

    If you don't have "new" code in the database, I recommend clearing the reference to the Microsoft ActiveX Data Objects 2.n Library. Both this library (ADO) and the DAO library contain a recordset object. This can cause confusion.

    And to avoid ambiguity for the future, change all declarations of the form

    Dim ... As Recordset

    to

    Dim ... As DAO.Recordset

    Similar for Dim ... As Field, if you have those.

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Access97 to 2000 conversion (2000 - 9.0.4402 S

    Hi,
    When you declared your recordsets, did you specify DAO.Recordset? Otherwise Access will (unless you've changed the reference priority) assume an ADODB.Recordset by default. You may well find that your code is returning a DAO.Recordset but then trying to assign it to an ADODB.Recordset variable.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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