Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Upgrading from Office 97 to Office 2000

    I am in the process of upgrading to OS2000 and Office 2000. What do I have to do to change the code below so it works correctly? Having problems with the DAO 35. Some fo the system will remain in the Office environment, but most will upgrade to Office 2000. How can I make it work with both levels?

    'On error resume next
    Set Dbe = Application.CreateObject("DAO.DBEngine.35")
    If Err.Number <> 0 Then

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Upgrading from Office 97 to Office 2000

    You can't with that code. DAO 3.5 is the Access 97 version of DAO. Access 2000 uses DAO 3.6, although I believe it will allow you to specify a DAO 3.51 database.

    Obviously you're trying to do this from outside Access, so it would help if you explain whether you're doing it from VB or from one of the other Office apps, and if it's VB, tell us the version. In any case, you're going to have to find a way to test the version of Access that's available on the machine, which could be done by searching for the registry key. Here's a routine I threw together in Access for this purpose when I first installed 2K. You may be able to adapt it to your needs.
    <pre>Public Function GetAccessVersion() As String
    'Created by Charlotte Foust 9/8/2000
    'Example:
    ' If GetAccessVersion() <> "8.0" Then
    ' Application.Quit acQuitSaveNone
    ' End If

    Dim strVersion As String
    Dim intPos As Integer
    strVersion = DBEngine.IniPath
    If InStr(strVersion, "SOFTWAREMicrosoftOffice") > 0 Then
    intPos = 1
    Do
    If IsNumeric(Mid(strVersion, intPos, 1)) Then
    strVersion = Mid(strVersion, intPos)
    Exit Do
    Else
    intPos = intPos + 1
    End If
    Loop Until intPos = 0
    strVersion = Left(strVersion, InStr(strVersion, "") - 1)
    End If
    GetAccessVersion = strVersion
    End Function</pre>

    Charlotte

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Upgrading from Office 97 to Office 2000

    In Office 2000, use DAO.DBEngine.36.

Posting Permissions

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