<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>RE: [AccessD] Access XP and references in libraries</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Comic Sans MS">It means that if the library file is in the application folder, which is determined by the user at installation, and the reference adjusts itself and points to it, the code still fails. If you open the VBE and uncheck and browse to the reference in the same location, resetting it to the same file, the code is fine. It doesn't seem to like library databases to move around. On the other hand, if it finds the file in exactly the same location as the original reference, then it doesn't have a problem.</FONT></P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Comic Sans MS">Charlotte Foust</FONT>
</P>
<UL>
<P><FONT FACE="Arial"></FONT> <FONT SIZE=1 FACE="Tahoma">-----Original Message-----</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">From: </FONT></B> <FONT SIZE=1 FACE="Tahoma">accessd-bounces@databaseadvisors.com [</FONT><A HREF="mailto:accessd-bounces@databaseadvisors.com"><U><FONT COLOR="#0000FF" SIZE=1 FACE="Tahoma">mailto:accessd-bounces@databaseadvisors.com</FONT></U></A><FONT SIZE=1 FACE="Tahoma">] </FONT><B> <FONT SIZE=1 FACE="Tahoma">On Behalf Of</FONT></B> <FONT SIZE=1 FACE="Tahoma">John W. Colby</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Sent: </FONT></B> <FONT SIZE=1 FACE="Tahoma">Monday, March 24, 2003 12:52 PM</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">To: </FONT></B> <FONT SIZE=1 FACE="Tahoma">accessd@databaseadvisors.com</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Subject: </FONT></B> <FONT SIZE=1 FACE="Tahoma">RE: [AccessD] Access XP and references in libraries</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I always just put the mde/a in the Windows directory. For MDAs the file is found and the reference fixed. I don't remember whether the reference to an MDE would be fixed. I have never heard of the reference "not being any good". What does that mean? The file is in the right place, the reference points to it, but the code still fails?</FONT></P>
<P><FONT SIZE=2 FACE="Arial">John W. Colby</FONT>
<BR><FONT SIZE=2 FACE="Arial">Colby Consulting</FONT>
<BR><A HREF="file://www.ColbyConsulting.com"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">www.ColbyConsulting.com</FONT></U></A>
</P>
<P><FONT SIZE=2 FACE="Arial">-----Original Message-----</FONT>
<BR><FONT SIZE=2 FACE="Arial">From: accessd-bounces@databaseadvisors.com</FONT>
<BR><FONT SIZE=2 FACE="Arial">[</FONT><A HREF="mailto:accessd-bounces@databaseadvisors.com]On"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">mailto:accessd-bounces@databaseadvisors.com]On</FONT></U></A><FONT SIZE=2 FACE="Arial"> Behalf Of Charlotte</FONT>
<BR><FONT SIZE=2 FACE="Arial">Foust</FONT>
<BR><FONT SIZE=2 FACE="Arial">Sent: Monday, March 24, 2003 3:42 PM</FONT>
<BR><FONT SIZE=2 FACE="Arial">To: accessd@databaseadvisors.com</FONT>
<BR><FONT SIZE=2 FACE="Arial">Subject: RE: [AccessD] Access XP and references in libraries</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">We are using an Access MDE, not an add-in, and setting a reference to it</FONT>
<BR><FONT SIZE=2 FACE="Arial">in the app that gets packaged. The MDE isn't "installed", it is simply</FONT>
<BR><FONT SIZE=2 FACE="Arial">placed in a folder by the application installer. Late binding solved</FONT>
<BR><FONT SIZE=2 FACE="Arial">the problem of breakage when the CDO.DLL wasn't installed, although</FONT>
<BR><FONT SIZE=2 FACE="Arial">since we couldn't use the CDO constants, I had to create a set of user</FONT>
<BR><FONT SIZE=2 FACE="Arial">defined constants for handling the possible errors we wanted to trap. </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The problem we found is that Access doesn't handle a reference, at least</FONT>
<BR><FONT SIZE=2 FACE="Arial">to an MDE, quite the way the articles suggest. The reference gets</FONT>
<BR><FONT SIZE=2 FACE="Arial">resolved and it isn't shown as MISSING when we put it into the</FONT>
<BR><FONT SIZE=2 FACE="Arial">application folder, but it also isn't any good. The only cure we've</FONT>
<BR><FONT SIZE=2 FACE="Arial">found in both 97 and 2002 is to have the installer insert the MDE being</FONT>
<BR><FONT SIZE=2 FACE="Arial">referenced into a folder we know is always going to be there in the same</FONT>
<BR><FONT SIZE=2 FACE="Arial">location, because we create it during the install. Out development</FONT>
<BR><FONT SIZE=2 FACE="Arial">machines have that same folder, and our databases have to have the</FONT>
<BR><FONT SIZE=2 FACE="Arial">reference set to that file in that folder before we build the installer.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Then the app works when it's installed on a target machine. Otherwise</FONT>
<BR><FONT SIZE=2 FACE="Arial">we get unexpected "Function 'Format' not found..." , etc., messages and</FONT>
<BR><FONT SIZE=2 FACE="Arial">things break.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Charlotte Foust</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Arial">-----Original Message-----</FONT>
<BR><FONT SIZE=2 FACE="Arial">From: MartyConnelly [</FONT><A HREF="mailto:martyconnelly@shaw.ca"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">mailto:martyconnelly@shaw.ca</FONT></U></A><FONT SIZE=2 FACE="Arial">] </FONT>
<BR><FONT SIZE=2 FACE="Arial">Sent: Friday, March 21, 2003 1:10 PM</FONT>
<BR><FONT SIZE=2 FACE="Arial">To: accessd@databaseadvisors.com</FONT>
<BR><FONT SIZE=2 FACE="Arial">Subject: Re: [AccessD] Access XP and references in libraries</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">I am guessing (don't know how you are installing mda) but there is a </FONT>
<BR><FONT SIZE=2 FACE="Arial">difference in how Access 97 and 2000 (+ )resolves references.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> ACC97: How Access 97 Resolves Visual Basic for Applications References </FONT>
<BR><FONT SIZE=2 FACE="Arial">(Q280465)</FONT>
<BR><FONT SIZE=2 FACE="Arial"> ACC2000: How Access 2000 Resolves Visual Basic for Applications </FONT>
<BR><FONT SIZE=2 FACE="Arial">References (Q248941)</FONT>
<BR><FONT SIZE=2 FACE="Arial"> ACC2002: How Access 2002 Resolves Visual Basic for Applications </FONT>
<BR><FONT SIZE=2 FACE="Arial">References (Q286300)</FONT>
<BR><FONT SIZE=2 FACE="Arial">The latter two have an extra step for resolution and also look in </FONT>
<BR><FONT SIZE=2 FACE="Arial">different directories.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Also MS has added in Office 2000 a method of adding an Office COM Addin</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">that will link to all office products at same time; maybe this is </FONT>
<BR><FONT SIZE=2 FACE="Arial">causing the reference checking problem. Sort of an</FONT>
<BR><FONT SIZE=2 FACE="Arial">MDA for Word, Excel and Access. At some point Access has to resolve for</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">these as well.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> HOWTO: Build an Office 2000 COM Add-In in Visual Basic Q238228</FONT>
<BR><FONT SIZE=2 FACE="Arial">---------------------------------------</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Have a look at Tony Toew's site for his notes on using Addin's </FONT>
<BR><FONT SIZE=2 FACE="Arial">especially if using MDE's </FONT><A HREF="http://www.granite.ab.ca/access/addins.htm"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.granite.ab.ca/access/addins.htm</FONT></U></A>
</P>
<P><FONT SIZE=2 FACE="Arial">----------------------------------------</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Here is Dev Ashish's method for late binding a mapi session</FONT>
<BR><FONT SIZE=2 FACE="Arial">where mobjSession set to object</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Public Sub MAPILogon()</FONT>
<BR><FONT SIZE=2 FACE="Arial">On Error GoTo err_sMAPILogon</FONT>
<BR><FONT SIZE=2 FACE="Arial">Const cERROR_USERCANCEL = -2147221229</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> mstStatus = SysCmd(acSysCmdSetStatus, "Login....")</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Set mobjSession = CreateObject("MAPI.Session")</FONT>
<BR><FONT SIZE=2 FACE="Arial"> mobjSession.Logon</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">exit_sMAPILogon:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Exit Sub</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">err_sMAPILogon:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> mboolErr = True</FONT>
<BR><FONT SIZE=2 FACE="Arial"> If Err = CdoE_LOGON_FAILED - mcERR_DECIMAL Then</FONT>
<BR><FONT SIZE=2 FACE="Arial"> MsgBox "Logon Failed", vbCritical + vbOKOnly, "Error"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> ElseIf Err = cERROR_USERCANCEL Then</FONT>
<BR><FONT SIZE=2 FACE="Arial"> MsgBox "Aborting since you pressed cancel.", _</FONT>
<BR><FONT SIZE=2 FACE="Arial"> vbOKOnly + vbInformation, "Operatoin Cancelled!"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Else</FONT>
<BR><FONT SIZE=2 FACE="Arial"> MsgBox "Error number " & Err - mcERR_DECIMAL & " description. "</FONT>
<BR><FONT SIZE=2 FACE="Arial">_</FONT>
<BR><FONT SIZE=2 FACE="Arial"> & Error$(Err)</FONT>
<BR><FONT SIZE=2 FACE="Arial"> End If</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Resume exit_sMAPILogon</FONT>
<BR><FONT SIZE=2 FACE="Arial">End Sub</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Charlotte Foust wrote:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">>Thanks, but I found all thatwhen we were first researching putting this</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">>in to a library in the first place. Right now I'm trying late binding </FONT>
<BR><FONT SIZE=2 FACE="Arial">>in the library database to see if we can at least get it to bomb </FONT>
<BR><FONT SIZE=2 FACE="Arial">>gracefully instead of breaking the application that references it. The</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">>problem is that in A97, the breakage was limited to the library </FONT>
<BR><FONT SIZE=2 FACE="Arial">>database and the application database just realized that it couldn't </FONT>
<BR><FONT SIZE=2 FACE="Arial">>use email. In AXP, the breakage affects the application database, not </FONT>
<BR><FONT SIZE=2 FACE="Arial">>just the library.</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>Charlotte Foust</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>-----Original Message-----</FONT>
<BR><FONT SIZE=2 FACE="Arial">>From: MartyConnelly [</FONT><A HREF="mailto:martyconnelly@shaw.ca"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">mailto:martyconnelly@shaw.ca</FONT></U></A><FONT SIZE=2 FACE="Arial">]</FONT>
<BR><FONT SIZE=2 FACE="Arial">>Sent: Thursday, March 20, 2003 5:24 PM</FONT>
<BR><FONT SIZE=2 FACE="Arial">>To: accessd@databaseadvisors.com</FONT>
<BR><FONT SIZE=2 FACE="Arial">>Subject: Re: [AccessD] Access XP and references in libraries</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>CDO is a wrapper around MAPI, the license is not redistributable but </FONT>
<BR><FONT SIZE=2 FACE="Arial">>the</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>version (1.1, 1.2, 1.21 and ver 6.0) you have depends on what you have</FONT>
<BR><FONT SIZE=2 FACE="Arial">>installed from a selection of Exchange, Outlook and WinXP or win2000.</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>By default, Outlook 2000 and Outlook 2002 installations do not include</FONT>
<BR><FONT SIZE=2 FACE="Arial">>the CDO 1.2x component. When you view the options for Office or Outlook</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">>setup, CDO is listed under the options for Outlook.</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">> For a full table of versions and what installs see INFO: Where to </FONT>
<BR><FONT SIZE=2 FACE="Arial">>Acquire the CDO Libraries (all versions) </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT><A HREF="http://support.microsoft.com/default.aspx?scid=kb;EN-US;171440"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://support.microsoft.com/default.aspx?scid=kb;EN-US;171440</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>For more info see:</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT><A HREF="http://www.cdolive.com/start.htm"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.cdolive.com/start.htm</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">> </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>Charlotte Foust wrote:</FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">> </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>>In 97, we had used a library database that had a reference set to the </FONT>
<BR><FONT SIZE=2 FACE="Arial">>>CDO.DLL library so we could handle email features using Redemption.</FONT>
<BR><FONT SIZE=2 FACE="Arial">>>If that DLL was missing on the target machine, the library had a </FONT>
<BR><FONT SIZE=2 FACE="Arial">>>broken reference but it didn't affect the main project except that the</FONT>
<BR><FONT SIZE=2 FACE="Arial">>> </FONT>
<BR><FONT SIZE=2 FACE="Arial">>></FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">> </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>>email capabilities were disabled. In XP, when you load the app, you</FONT>
<BR><FONT SIZE=2 FACE="Arial">>>get a message that the CDO.DLL is missing. I assume the difference in</FONT>
<BR><FONT SIZE=2 FACE="Arial">>> </FONT>
<BR><FONT SIZE=2 FACE="Arial">>></FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">> </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>>behavior is because of the change in the VBE IDE in 2000 and later,</FONT>
<BR><FONT SIZE=2 FACE="Arial">>>but does anyone know what the further implications might be? We </FONT>
<BR><FONT SIZE=2 FACE="Arial">>>haven't deployed this app yet, so I'm looking for input.</FONT>
<BR><FONT SIZE=2 FACE="Arial">>></FONT>
<BR><FONT SIZE=2 FACE="Arial">>>Charlotte Foust</FONT>
<BR><FONT SIZE=2 FACE="Arial">>></FONT>
<BR><FONT SIZE=2 FACE="Arial">>> </FONT>
<BR><FONT SIZE=2 FACE="Arial">>></FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">>_______________________________________________</FONT>
<BR><FONT SIZE=2 FACE="Arial">>AccessD mailing list</FONT>
<BR><FONT SIZE=2 FACE="Arial">>AccessD@databaseadvisors.com </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT><A HREF="http://databaseadvisors.com/mailman/listinfo/accessd"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://databaseadvisors.com/mailman/listinfo/accessd</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">>Website: </FONT><A HREF="http://www.databaseadvisors.com"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.databaseadvisors.com</FONT></U></A><FONT SIZE=2 FACE="Arial"> </FONT>
<BR><FONT SIZE=2 FACE="Arial">>_______________________________________________</FONT>
<BR><FONT SIZE=2 FACE="Arial">>AccessD mailing list</FONT>
<BR><FONT SIZE=2 FACE="Arial">>AccessD@databaseadvisors.com </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT><A HREF="http://databaseadvisors.com/mailman/listinfo/accessd"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://databaseadvisors.com/mailman/listinfo/accessd</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">>Website: </FONT><A HREF="http://www.databaseadvisors.com"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.databaseadvisors.com</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
<BR><FONT SIZE=2 FACE="Arial">> </FONT>
<BR><FONT SIZE=2 FACE="Arial">></FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">_______________________________________________</FONT>
<BR><FONT SIZE=2 FACE="Arial">AccessD mailing list</FONT>
<BR><FONT SIZE=2 FACE="Arial">AccessD@databaseadvisors.com</FONT>
<BR><A HREF="http://databaseadvisors.com/mailman/listinfo/accessd"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://databaseadvisors.com/mailman/listinfo/accessd</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">Website: </FONT><A HREF="http://www.databaseadvisors.com"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.databaseadvisors.com</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">_______________________________________________</FONT>
<BR><FONT SIZE=2 FACE="Arial">AccessD mailing list</FONT>
<BR><FONT SIZE=2 FACE="Arial">AccessD@databaseadvisors.com</FONT>
<BR><A HREF="http://databaseadvisors.com/mailman/listinfo/accessd"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://databaseadvisors.com/mailman/listinfo/accessd</FONT></U></A>
<BR><FONT SIZE=2 FACE="Arial">Website: </FONT><A HREF="http://www.databaseadvisors.com"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.databaseadvisors.com</FONT></U></A>
</P>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Arial">----------------------------------------------------</FONT>
<BR><FONT SIZE=2 FACE="Arial">Is email taking over your day? Manage your time with eMailBoss. </FONT>
<BR><FONT SIZE=2 FACE="Arial">Try it free! </FONT><A HREF="http://www.eMailBoss.com"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.eMailBoss.com</FONT></U></A><FONT SIZE=2 FACE="Arial"> << File: ATT00260.txt >> </FONT>
</P>
</UL>
</BODY>
</HTML>