ACC: "Undefined Function" Err Msg Referencing Column PropertyID: Q101673
|
Novice: Requires knowledge of the user interface on single-user computers.
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,
Microsoft Access will consider the entire reference as a whole, and will
not try to parse it. For example:
Eval("[Forms]![Formname]![Controlname].column(2)")
Microsoft has confirmed this to be a problem in the versions of Microsoft Access listed at the beginning of this article.
Form: PromptForm
--------------------
RecordSource: Orders
Combo box:
Name: TheCombo
RowSource: Orders
ColumnCount: 4
BoundColumn: 1
Query: ReferenceCombo
---------------------
Type: Select Query
Field: EmployeeID ([Employee ID] in Microsoft Access 1.x and 2.0)
Table: Employees
Criteria: =[Forms]![PromptForm]![TheCombo].column(2)
Field: LastName ([Last Name] in Microsoft Access 1.x and 2.0)
Table: Employees
Field: FirstName ([First Name] in Microsoft Access 1.x and 2.0)
Table: Employees
For more information about using the Column property in an expression, search on "Column property," and then "Refer to a column in a list in an expression," using the Microsoft Access 97 Help Index.
Keywords : kberrmsg QryParm
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: March 25, 1999