Question ADEs on Windows 7 and Windows XP

riddlemethis

New member
Local time
Today, 06:30
Joined
Aug 3, 2011
Messages
3
Apparently Access 2007 ADEs generated on a Windows 7 workstation won't run on Windows XP -- a particular problem for me since we use both at the moment but generally do ADE generation on Win 7.

Does anyone have any experience with this and suggestions how to fix it?

Many thanks,
riddlemethis
 
A couple of questions for you:
1) What is the error message that you get when attempting to run the ADE on the Windows XP machine?
2) Does the Windows 7 machine have Windows 7 Service Pack 1?
 
ByteMyzer:

  • Don't have firsthand knowledge of exact error. From what I've heard users can open the ade but whether they can, for example, open forms, run macros or access attached SQL Server tables (or local tables, for that matter) is unknown. Sorry I can't be more specific.
  • Service Pack 1 IS installed.
 
If your project uses ADO object references in the code, this will definitely be an issue. In Windows 7, Service Pack 1, Microsoft changed a number of the IID's for ADO Objects. See the following link for details: http://support.microsoft.com/kb/2517589

Even though they say that the Method 2 workaround (late-binding) does not apply to VBA applications, I've actually had success in implementing it in my MDB/MDE projects. You might try it on your ADP/ADE projects.

First, in your Visual Basic References, untick the checkbox next to Microsoft ActiveX Data Objects 2.x Library. Then, make the appropriate late-binding substitutions in your code:

Examples:
Code:
[COLOR="DarkGreen"]'Dim cn As ADODB.Connection[/COLOR]
[COLOR="Navy"]Dim[/COLOR] cn [COLOR="navy"]As Object[/COLOR]

[COLOR="darkgreen"]'Dim rs As ADODB.Recordset[/COLOR]
[COLOR="navy"]Dim[/COLOR] rs [COLOR="navy"]As Object[/COLOR]

[COLOR="darkgreen"]'Set cn = New ADODB.Connection[/COLOR]
[COLOR="navy"]Set[/COLOR] cn = CreateObject("ADODB.Connection")

[COLOR="darkgreen"]'Set rs = New ADODB.Recordset[/COLOR]
[COLOR="navy"]Set[/COLOR] rs = CreateObject("ADODB.Recordset")

Finally, recompile your ADE project.
 
Thanks for the details, ByteMyzer, I'll see if we can apply it. This is great...
 

Users who are viewing this thread

Back
Top Bottom