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: 824277 - Last Review: July 23, 2007 - Revision: 3.1 Error message when you try to open a query that contains a function: "Undefined Function <FunctionName> in Expression" Moderate: Requires basic macro, coding, and interoperability
skills.
This article applies to a Microsoft Access database (.mdb) file or to a Microsoft Access database (.accdb) file.
For a Microsoft Access 2002 version of this article, see 275110Â
(http://kbalertz.com/Feedback.aspx?kbNumber=275110/
)
.
On This PageSYMPTOMSIn Microsoft Office Access 2007, when
you try to open a query that contains a function, you receive one of the following
error messages: Error message 1 Your Microsoft Access database or project contains a missing or
broken reference to the file FileName. Error message 2 To ensure that your
database or project works properly, you must fix this reference. When you
click OK, you receive the
following error message: Undefined function
FunctionName in expression. In Microsoft Office Access 2003, when
you try to open a query that contains a function, you receive the following
error message: Undefined function
FunctionName in expression. CAUSEThe
database contains a reference to the database, to the type library, or to the object
library that is marked as missing in the MISSING:
ReferenceName check box. This check box appears in the References
dialog box. WORKAROUNDTo work around this issue, remove the reference that is marked as missing. To do this, follow these steps:
- Start Access.
- Open the database that contains the missing or broken reference.
- Press ALT+F11 to open the Visual Basic Editor.
- On the Tools menu in the Visual Basic Editor, click
References.
- Click to clear the MISSING:
ReferenceName check box for the type library or for the object
library.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. MORE INFORMATIONWhen you open a database in Access 2007 or in Access 2003, you are informed
about any problems with referencing external libraries and projects. When the
database has a broken reference to a library or to a project at the time that you try
to run a query that calls a function, you receive the first error message that is mentioned in the "Symptoms" section. When you click
OK, you receive the second error message that is mentioned in the "Symptoms" section. You receive the first error message one time. If you have other queries that
have calls to functions, you receive only the second error message when you run the other queries. This behavior occurs until you close and then reopen the
database. Caution If you follow the steps in this sample, you modify the
Northwind sample database. You must back up the
Northwind sample database, and then follow
these steps on a copy of the Northwind sample database. Steps to reproduce the problem- Create a new blank database in Access.
- Close the database that you created in step 1, and then open the Northwind sample database.
- Use the following Microsoft SQL statements to create two new queries in the
Northwind sample database.
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Trim([City])
& ", " & Trim([Region]) & " " & Trim([PostalCode]) AS CoAddress FROM
Customers; Save this query as QryTest.SELECT CustomerID, Left([CompanyName],4) AS ShortName FROM Customers;
Save this query as QryTest2.
- On the View menu, point to
Database Objects, and then click
Modules.
Note If you use Access 2007, click Supporting Objects in the left pane. - Open the Utility Functions module in
Design view.
Note In Access 2007, double-click the Utilities module. - On the Tools menu in the Visual Basic Editor, click
References.
- In the References - Northwind dialog box,
click Browse.
- Select Microsoft Access Databases (*.mdb)
in the Files of type list, and then locate the folder where
you put the database that you created in step 1.
Note In Access 2007, select Microsoft Access Databases (*.accdb) in the Files of type list, and then locate the folder where
you put the database that you create in step 1. - Click the database that you created in step 1, and then click
Open.
- In the
References dialog box, click OK, and then exit Access.
- Open Windows Explorer, locate the folder where
you put the database that you create in step 1, and then delete the database.
- Reopen the Northwind sample database, and then try to open the QryTest
query or the QryTest2 query. Notice that the following behavior occurs:
- In Access 2007, you receive one of the following error messages:
Error message 1 Your Microsoft Access database or project contains a missing or
broken reference to the file FileName. Error message 2 To ensure that your
database or project works properly, you must fix this reference. - In Access 2003, you receive the following
error message:
Undefined function
FunctionName in expression.
- Click OK.
If you are using Access 2007, notice that you receive the following
error message:Undefined function
FunctionName in expression.
APPLIES TO- Microsoft Office Access 2007
- Microsoft Office Access 2003
| kbprb kbtshoot kbexpertiseinter kberrmsg kbbug KB824277 |
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
|
 |
 |
 |
 |
 |
 |
 |
| |