<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3502.5390" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have a problem with ADOX references in 
Access.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" 
/><o:p></o:p> </FONT></DIV>
<DIV> </DIV>
<DIV class=MsoNormal><FONT face=Arial size=2>I develop on a PC and have a 
reference to msadox.dll. The Available References box shows: "Microsoft ADO Ext. 
2.7 for DLL and Security" (which is ADOX version 2.7).</FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2>When I copy the application to 
another PC that has not the ADOX version 2.7 (but has a lower ADOX version), I 
find immediately a Broken Reference (shown in the Available References box as 
"MISSING:…").</FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2>Fixing it in the Available 
References box is simple though somewhat weird:</FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2>I know no better way than clearing 
the ADOX version 2.7 (which refers to …\ADO\msadox.dll), leave the Available 
References box, return to it and mark the "Microsoft ADO Ext. 2.1 for DLL and 
Security" (yes: ADOX version 2.1) and it is fixed. Why weird:<SPAN 
style="mso-spacerun: yes">  </SPAN>if I return the Available References 
box, it will show me "Microsoft ADO Ext. 2.5 for DLL and Security" or "Microsoft 
ADO Ext. 2.6 for DLL and Security" (yes: ADOX version 2.5 or 2.6). All 
references (broken or fixed) refer to the very same file 
…\ADO\msadox.dll.</FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial></FONT></FONT> </DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial>Now my problem: how to do 
this in code. Come'on Access aficionados: don’t' tell 
me:<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial><SPAN 
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><SPAN 
style="mso-spacerun: yes">           
</SPAN>Access.Application.References.Remove 
References.Item(3)</SPAN></FONT></FONT></DIV>
<DIV class=MsoNormal><SPAN 
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"></SPAN><FONT 
size=2><FONT face=Arial><SPAN 
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><SPAN 
style="mso-spacerun: yes">           
</SPAN>Call Access.Application.References.AddFromGuid( 
_<o:p></o:p></SPAN></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial><SPAN 
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><SPAN 
style="mso-spacerun: yes">                
</SPAN>"{00000600-0000-0010-8000-00AA006D2EA4}", 2, 
1)<o:p></o:p></SPAN></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial>What's the problem:<SPAN 
style="mso-spacerun: yes">  </SPAN>the first line References.Remove 
References.Item(3)<SPAN style="mso-spacerun: yes">  </SPAN>does not 
work:<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial>Err = -2147319779:<SPAN 
style="mso-spacerun: yes">   </SPAN>"Object Library not 
registered".<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial>To be obvious: regsvr32<SPAN 
style="mso-spacerun: yes">  </SPAN><path>\msadox.dll does not 
help.<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2>I interpret this as: the program 
cannot handle the "Microsoft ADO Ext. 2.7 for DLL and Security" description as 
it is not known in the registry.</FONT></DIV>
<DIV class=MsoNormal> </DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial>Anybody who can give me good 
advice. I want to have a bulletproof solution in 
VBA.<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial>What I am not asking for is 
an answer like:<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal 
style="MARGIN-LEFT: 24pt; TEXT-INDENT: -18pt; mso-list: l8 level1 lfo21; tab-stops: list 24.0pt"><FONT 
size=2><FONT face=Arial><SPAN style="FONT-FAMILY: 'Times New Roman'">-<SPAN 
style="FONT: 7pt 'Times New Roman'">          
</SPAN></SPAN>Fix it in the Available References 
box.<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal 
style="MARGIN-LEFT: 24pt; TEXT-INDENT: -18pt; mso-list: l8 level1 lfo21; tab-stops: list 24.0pt"><FONT 
size=2><FONT face=Arial><SPAN style="FONT-FAMILY: 'Times New Roman'">-<SPAN 
style="FONT: 7pt 'Times New Roman'">          
</SPAN></SPAN>Install ADOX 2.7 (or MDAC 2.6, -2.7) on the other PC (these are 
PCs on client locations and they do not allow me to dictate the ADOX version 
(which would be ridiculous too)).<SPAN 
style="FONT-FAMILY: 'Times New Roman'"></SPAN></FONT></FONT></DIV>
<DIV class=MsoNormal 
style="MARGIN-LEFT: 24pt; TEXT-INDENT: -18pt; mso-list: l8 level1 lfo21; tab-stops: list 24.0pt"><FONT 
size=2><FONT face=Arial><SPAN style="FONT-FAMILY: 'Times New Roman'">-<SPAN 
style="FONT: 7pt 'Times New Roman'">          
</SPAN></SPAN>Make a Reference to ADOX 2.1 or ADOX 2.5 on your own PC: that does 
not help, it will show up again as ADOX 2.7.<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial></FONT></FONT> </DIV>
<DIV class=MsoNormal><FONT size=2><FONT face=Arial>Any good advice 
?<o:p></o:p></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN lang=NL 
style="mso-ansi-language: NL">Leendert van 
Staalduinen.</SPAN></FONT></DIV></BODY></HTML>