ACC2002: InputParameter Property Cannot Perform Lookup to Visual Basic for Applications Function (287449)
The information in this article applies to:
This article was previously published under Q287449 Moderate: Requires basic macro, coding, and interoperability
skills.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS When you try to evaluate an input parameter in a function
that is referenced in the RecordSource property of a form, the InputParameter property is properly populated. However, you receive the
following error message when you open the form and supply a valid input
parameter: Invalid SQL Statement.
Check the
server filter on the form record source. CAUSE This is a limitation in Microsoft Access. Access performs
basic evaluation of object references, but Access does not perform Visual Basic
for Applications function evaluation. RESOLUTION Set the record source of the form to an SQL statement that
accepts parameters, similar to the following:
SELECT * FROM Products WHERE CategoryID = ?
You must also set the InputParameter property equal to a reference to the function, similar to the
following:
lGetValue()
STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 11/6/2003 |
---|
Keywords: | kbbug kberrmsg kbnofix KB287449 |
---|
|