John W. Colby
jcolby at ColbyConsulting.com
Mon Mar 24 14:52:17 CST 2003
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? John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte Foust Sent: Monday, March 24, 2003 3:42 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Access XP and references in libraries We are using an Access MDE, not an add-in, and setting a reference to it in the app that gets packaged. The MDE isn't "installed", it is simply placed in a folder by the application installer. Late binding solved the problem of breakage when the CDO.DLL wasn't installed, although since we couldn't use the CDO constants, I had to create a set of user defined constants for handling the possible errors we wanted to trap. The problem we found is that Access doesn't handle a reference, at least to an MDE, quite the way the articles suggest. The reference gets resolved and it isn't shown as MISSING when we put it into the application folder, but it also isn't any good. The only cure we've found in both 97 and 2002 is to have the installer insert the MDE being referenced into a folder we know is always going to be there in the same location, because we create it during the install. Out development machines have that same folder, and our databases have to have the reference set to that file in that folder before we build the installer. Then the app works when it's installed on a target machine. Otherwise we get unexpected "Function 'Format' not found..." , etc., messages and things break. Charlotte Foust -----Original Message----- From: MartyConnelly [mailto:martyconnelly at shaw.ca] Sent: Friday, March 21, 2003 1:10 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Access XP and references in libraries I am guessing (don't know how you are installing mda) but there is a difference in how Access 97 and 2000 (+ )resolves references. ACC97: How Access 97 Resolves Visual Basic for Applications References (Q280465) ACC2000: How Access 2000 Resolves Visual Basic for Applications References (Q248941) ACC2002: How Access 2002 Resolves Visual Basic for Applications References (Q286300) The latter two have an extra step for resolution and also look in different directories. Also MS has added in Office 2000 a method of adding an Office COM Addin that will link to all office products at same time; maybe this is causing the reference checking problem. Sort of an MDA for Word, Excel and Access. At some point Access has to resolve for these as well. HOWTO: Build an Office 2000 COM Add-In in Visual Basic Q238228 --------------------------------------- Have a look at Tony Toew's site for his notes on using Addin's especially if using MDE's http://www.granite.ab.ca/access/addins.htm ---------------------------------------- Here is Dev Ashish's method for late binding a mapi session where mobjSession set to object Public Sub MAPILogon() On Error GoTo err_sMAPILogon Const cERROR_USERCANCEL = -2147221229 mstStatus = SysCmd(acSysCmdSetStatus, "Login....") Set mobjSession = CreateObject("MAPI.Session") mobjSession.Logon exit_sMAPILogon: Exit Sub err_sMAPILogon: mboolErr = True If Err = CdoE_LOGON_FAILED - mcERR_DECIMAL Then MsgBox "Logon Failed", vbCritical + vbOKOnly, "Error" ElseIf Err = cERROR_USERCANCEL Then MsgBox "Aborting since you pressed cancel.", _ vbOKOnly + vbInformation, "Operatoin Cancelled!" Else MsgBox "Error number " & Err - mcERR_DECIMAL & " description. " _ & Error$(Err) End If Resume exit_sMAPILogon End Sub Charlotte Foust wrote: >Thanks, but I found all thatwhen we were first researching putting this >in to a library in the first place. Right now I'm trying late binding >in the library database to see if we can at least get it to bomb >gracefully instead of breaking the application that references it. The >problem is that in A97, the breakage was limited to the library >database and the application database just realized that it couldn't >use email. In AXP, the breakage affects the application database, not >just the library. > >Charlotte Foust > >-----Original Message----- >From: MartyConnelly [mailto:martyconnelly at shaw.ca] >Sent: Thursday, March 20, 2003 5:24 PM >To: accessd at databaseadvisors.com >Subject: Re: [AccessD] Access XP and references in libraries > > >CDO is a wrapper around MAPI, the license is not redistributable but >the > >version (1.1, 1.2, 1.21 and ver 6.0) you have depends on what you have >installed from a selection of Exchange, Outlook and WinXP or win2000. > >By default, Outlook 2000 and Outlook 2002 installations do not include >the CDO 1.2x component. When you view the options for Office or Outlook >setup, CDO is listed under the options for Outlook. > > For a full table of versions and what installs see INFO: Where to >Acquire the CDO Libraries (all versions) >http://support.microsoft.com/default.aspx?scid=kb;EN-US;171440 > >For more info see: >http://www.cdolive.com/start.htm > > >Charlotte Foust wrote: > > > >>In 97, we had used a library database that had a reference set to the >>CDO.DLL library so we could handle email features using Redemption. >>If that DLL was missing on the target machine, the library had a >>broken reference but it didn't affect the main project except that the >> >> > > > >>email capabilities were disabled. In XP, when you load the app, you >>get a message that the CDO.DLL is missing. I assume the difference in >> >> > > > >>behavior is because of the change in the VBE IDE in 2000 and later, >>but does anyone know what the further implications might be? We >>haven't deployed this app yet, so I'm looking for input. >> >>Charlotte Foust >> >> >> > > >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > > _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 5156 bytes Desc: not available URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030324/78b230c3/attachment-0001.bin>