ACC2000: "Undefined Function" Error Message Referencing Column PropertyID: Q209496
|
When you try to run macro actions that contain a WHERE clause (ApplyFilter, OpenForm, OpenReport, and FindRecord), and queries that reference the Column property of a combo box or list box on a form, you may receive the following error message:
Undefined Function '[Forms]![Formname]![Controlname].column' in Expression.
Microsoft Access interprets any text followed by opening and closing parentheses as a user-defined function.
If you wrap the expression inside the Eval() function as a text string, Access will consider the entire reference as a whole, and will not try parsing it. For example:
Eval("[Forms]![Formname]![Controlname].column(2)")
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file
and perform these steps on a copy of the database.
Form: PromptForm
-------------------------
ControlSource: Orders
Combo box
------------------------------
Name: TheCombo
ControlSource: Selection Field
ColumnCount: 4
BoundColumn: 1
Query: ReferenceCombo
---------------------------------------------------
Type: Select Query
Field: EmployeeID
Table: Employees
Criteria: =[Forms]![PromptForm]![TheCombo].column(2)
Field: LastName
Table: Employees
Field: FirstName
Table: Employees
Undefined Function '[Forms]![PromptForm]![TheCombo].column' in Expression.
For more information about using the Column property in an expression, click Microsoft Access Help on the
Help menu, type "Refer to a column in a list in an expression" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned.
Additional query words: pra
Keywords : kberrmsg kbdta QryParm
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 18, 1999