ACC: Cannot Use Intrinsic Constants in Queries, Forms, ReportsLast reviewed: August 29, 1997Article ID: Q164006 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you use Microsoft Access intrinsic constants in expressions in a query, on a form or report, or in the Condition column of a macro, you receive an error or you are prompted to enter a parameter. For example, when you use the StrConv() function in the Update To cell of an update query and then run it, you receive the following error message:
Microsoft Access can't update all the records in the update query.When you use the StrConv() function in the Criteria cell of a select query, you receive the following error message:
Data type mismatch in criteria expression.If you use the StrConv() function in an expression in the Field cell of a query, or in the ControlSource property of a control on a report, Microsoft Access prompts you for a parameter value. For example, if you type Expr1: StrConv([CompanyName], vbUpperCase) in the Field cell of a query, and then run it, Microsoft Access prompts you to enter a parameter value for "vbUpperCase." If you use the StrConv() function in the ControlSource property of a control on a form, the control displays #Name? in Form view. If you use the StrConv() function in the Condition column of a macro, you receive the following error message:
Microsoft Access can't find the name '<intrinsic constant name>' you entered in the expression.This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual.
CAUSEThe query does not recognize the value of the Visual Basic intrinsic constants you used in the function.
RESOLUTIONTo work around this behavior, use one of the following methods:
STATUSThis behavior is by design. Intrinsic constants can only be used in Visual Basic for Applications code.
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESFor more information about Microsoft Access intrinsic constants, search the Help Index for "constants, intrinsic." For more information about using the StrConv() function in Microsoft Access, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q110391 TITLE : ACC: Sample Function to Capitalize Words and Phrases |
Additional query words: action update delete make table select
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |