Access 2007 upgrade DAO references conflict

coalminer

New member
Local time
Today, 13:11
Joined
Jul 21, 2010
Messages
3
I am updating an Access 97 DB w/ VBA code to Access 2007. The VBA code uses DAO objects that Access 2007 references when I converted the db files (first from 97 to 2002, then to 2007). My problem specifically is with the two references: "Microsoft DAO 3.6 Object Library" and "Microsoft Office 12.0 Access database engine Object Library." The stuff I've read on the web says that the ADE 12.0 is supposed to supercede the DAO 3.6 reference, and that by just checking the ADE 12.0 box everything should work. Since they both provide references for objects of the same name, these two references cannot be checked at the same time. However, when check the DAO 3.6 box, and leave the ADE 12.0 box unchecked, Access can't find a "frmLogin" form that exists. If I uncheck the DAO 3.6 box and check the ADE 12.0 box, I get a run-time error 13: "type mismatch" for a Visual Basic "Err" object:

Code:
Public Function basGetString(ByVal lngStringIDAs Long, ParamArray varStringArgs() _ 
      As Variant)As String 
     Dim intTokenCount AsInteger 
     Dim strResString AsString 
 
On Error GoTo err_basGetString 
 
    strResString = basLoadString(lngStringID) 
 
    If Not IsMissing(varStringArgs)Then 
        intTokenCount = 0 
 
         Do While intTokenCount<= UBound(varStringArgs) 
              strResString = basReplaceToken(strResString, _ 
              m_cstrArgToken, varStringArgs(LBound(varStringArgs)+ intTokenCount),_    
              1,1) 
 
              intTokenCount = intTokenCount+ 1 
         Loop 
    End If 
 
    strResString = basReplaceToken(strResString, m_cstrVBCRLFToken, vbCrLf,-1, 1) 
    basGetString = strResString 
 
 exit_basGetString: 
      Exit Function 
 err_basGetString: 
      Err.RaiseErr.Number, "basGetString", Err.Description 
 
 End Function 

The debugger points the the second-to-last line:
Err.Raise Err.Number,"basGetString", Err.Description

The debugger points the the second-to-last line:

Code:
Err.Raise Err.Number,"basGetString", Err.Description

I have been successful disambiguating recordset objects, which resolved many of the other referencing conflicts in the code:Dim rs As DAO.Recordset or Dim rs As ADODB.Recordset, but this hasn't worked with the Err object. -That is, I've tried to rewrite the Err object as a DAO Error object. I also have not been able to find another reference in the VB editor that resolves this referencing error, but doesn't also conflict with the other ADE 12.0 reference. So, I don't understand why checking the ADE 12.0 box doesn't solve all my problems. And I'm having trouble figuring out how to rewrite the code so that it references the ADE 12.0 library instead. Lastly, the ADE 12.0 reference is really pointing to the ACEDAO.DLL in the following folder: C:\Program Files\Common Files\Microsoft Shared\OFFICE12. Any suggestions would be really appreciated.
 
yes... I have installed:

'97 runtime,
2002 (as part of the Office 2002 developer ed.),
2007
 
vbaInet-

thanks! It's good to be here!

Also, I forgot to mention that I did unregister and then reregister dao360.dll.
I came across the link you referenced in my searching...
 
There is no problem running multiple versions of Access on the same computer. But you could encounter problems if you run them simultaneously. That is, I have A97, A2000, A2003 and A2007 on this PC. A97 doesn't interfere with the others because it doesn't use the MSI, but as long as I run any of the other three in succession (not two versions at once), there are no problems.

The key is letting the re-install process run to completion for each version. A2003 is my base version (I do most of my work in it), so if I close A2003 and open A2007, it will register itself as the canonical version of Access for this machine, and work just fine as long as I don't cancel the install before it completes. When I close A2007, I can open A2003 and it will re-register itself as the canonical version of Access on this PC, and, again, as long as I don't cancel the installation process before it completes, all will work correctly.

The only times I've ever run into problems are:

1. launching A2003 while A2007 was running (and vice versa).

2. cancelling the installer.
 
3. Falling asleep while you wait?

Perhaps that's just me.
 

Users who are viewing this thread

Back
Top Bottom