Microsoft Knowledge Base Email Alertz

KBAlertz.com: If you have a procedure that contains a Visual Basic for Applications function and your database contains a reference to a missing object library or type library, you may receive one of the following error messages when you compile your mod

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 283806 - Last Review: November 27, 2007 - Revision: 5.4

Visual Basic for Applications (VBA) functions break in a database with missing references

This article was previously published under Q283806
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

For a Microsoft Access 2000 version of this article, see 208218  (http://kbalertz.com/Feedback.aspx?kbNumber=208218/EN-US/ ) .
For a Microsoft Access 97 version of this article, see 160870  (http://kbalertz.com/Feedback.aspx?kbNumber=160870/ ) .

On This Page

SYMPTOMS

If you have a procedure that contains a Visual Basic for Applications function and your database contains a reference to a missing object library or type library, you may receive one of the following error messages when you compile your modules or run the procedure:

Error message 1

Your Microsoft Access database or project contains a missing or broken reference to the file <filename>.

* To ensure that your database or project works properly, you must fix this reference.

* To learn how to fix this reference, click Help.

Error message 2

Compile Error:
Can't find project or library

CAUSE

Your database contains a reference to a database, type library, or object library that is marked as MISSING: <referencename> in the References dialog box.

RESOLUTION

To remove the missing reference, follow these steps:
  1. Open your database.
  2. Press ALT+F11 to open the Visual Basic Editor.
  3. On the Tools menu, click References.
  4. Click to clear the check box for the type library or object library marked as MISSING: <referencename>.
An alternative to removing the reference is to restore the referenced file to the path that is specified in the References dialog box. If the referenced file is in a new location, clear the MISSING: <referencename> reference, and then create a new reference to the file in the new folder.

NOTE: In an Access run-time application, you cannot view references from a menu. However, the following article demonstrates how to view references using code:
209849  (http://kbalertz.com/Feedback.aspx?kbNumber=209849/ ) How to loop through references to view their properties

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Open the sample database Northwind.mdb.
  2. Create a new form that is not based on any table or query.
  3. On the Insert menu, click ActiveX Control.
  4. In the Select an Activex control list, click Kodak Image Edit Control, and then click OK.
  5. Save the form as frmReference, and then close it.
  6. Close Northwind.mdb, and then quit Access.
  7. Find and rename the ImgEdit.ocx file to ImgEdit.old.
  8. Start Access, and then open Northwind.mdb.
  9. Open the Startup module in Design view.
  10. On the Debug menu, click Compile Northwind. Note that you receive both of the error messages that are mentioned in the "Symptoms" section of this article.
  11. Click OK. Note that the References dialog box appears; the following reference is highlighted in the Available References dialog box:
    MISSING: Kodak Image Edit Control
    					
  12. Click Cancel in the Available References dialog box.
  13. Find and rename the ImgEdit.old file to ImgEdit.ocx.
  14. Repeat step 10 and note that the error message no longer appears.

REFERENCES

For additional information about another problem that could cause the first error message, click the following article number to view the article in the Microsoft Knowledge Base:
275110  (http://kbalertz.com/Feedback.aspx?kbNumber=275110/ ) "Undefined function in expression" error message when you open a query that references a function

APPLIES TO
  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
  • Microsoft Office Excel 2003
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Word 2002
Keywords: 
kbproductlink kbfunctions kbvba kberrmsg kbprb KB283806
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please