The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. SYMPTOMSWhen you use the BuildCriteria method, you may receive one of the following errors:
-or-
-or- Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Solution Provider or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Solution Providers, please see the following page on the World Wide Web: http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.asp CAUSEYou have used an SQL reserved word for the expression argument of the BuildCriteria method. Specifically, you have used either the word "Select" or "In" for your expression, as in the following example:
RESOLUTIONWhen you use the BuildCriteria method, enclose the expression in single quotation marks, as in the following example:
MORE INFORMATION
Both "In" and "Select" are SQL Reserved Words that can be used to indicate
the presence of a subquery within a standard SQL statement. When these
words are supplied as the expression argument for the BuildCriteria method, Microsoft Access expects a subquery to follow.
Steps to Reproduce BehaviorYou can easily reproduce the described errors in the Immediate window, as follows:
and press ENTER. Note that you receive the following output:
region = 'in' REFERENCESFor more information about the BuildCriteria method, in the Visual Basic Editor, click
Microsoft Visual Basic Help on the Help menu, type
BuildCriteria method in the Office Assistant or the Answer Wizard, and
then click Search to view the topic. Q208970 ACC2000: Run-time error '2448' with BuildCriteria Method Additional query words: prb filter criteria
Keywords : kbdta PgmErr |
Last Reviewed: August 31, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |