ACC: "Undefined Function" Error Referencing Combo Box Column (141617)
The information in this article applies to:
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q141617
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
In Microsoft Access, you may receive the following error message if you
refer to the Column property of a combo box in a query's criteria row
(query by form):
Undefined function '[Forms]![FormName]![ComboBoxName].[Column]' in
expression.
CAUSE
Microsoft Access tries to parse the criteria expression at the "("
(opening parenthesis). When doing so, Microsoft Access concludes that the
unbroken string preceding the "." (period) (and returned within single
quotation marks in the error message) is a user-defined function. Because
Microsoft Access finds no such function in any of your modules, you receive
the "Undefined function" message.
RESOLUTION
Wrap the entire reference as a text string inside an Eval() function. This
tells Microsoft Access to consider the entire reference as a whole and
not to attempt to parse it.
For example, to refer to the first (left-most) column of a combo box in the
Criteria row of the QBE grid, use the following syntax.
Eval("[Forms]![FormName]![ComboBoxName].[Column](0)")
Modification Type: | Major | Last Reviewed: | 5/7/2003 |
---|
Keywords: | kberrmsg kbprb KB141617 |
---|
|