ACC: Parameter Limit for Functions in ValidationRule PropertyLast reviewed: August 29, 1997Article ID: Q105127 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you are creating a ValidationRule property for a table or control, you may receive the error message "The expression you entered is too complex" in Microsoft Access for Windows 95 version 7.0 or "Expression Too Complex" in Microsoft Access versions 1.x and 2.0.
CAUSEYou can pass a maximum of 28 parameters to a function when you call the function from the ValidationRule property of a control. Attempts to pass more than 28 parameters will result in the error message stated above. (This also applies to table validation rules which can reference user- defined functions only in Access version 1.x.)
RESOLUTIONYou can pass more than 28 parameters by concatenating parameters. Each parameter will be separated by a character (for example, a semicolon). After passing the individual parameters as one long parameter, you can parse the individual parameters by searching for the separator character (the semicolon), using the InStr() and Mid() functions.
MORE INFORMATIONThis section of the 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 the "Building Applications With Microsoft Access For Windows 95" manual. NOTE: Visual Basic for Applications (used in Microsoft Access for Windows 95, version 7.0) is called Access Basic in earlier versions. For more information about Access Basic, please refer to the "Introduction to Programming" manual in Microsoft Access version 1.x or the "Building Applications" manual in version 2.0. NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.
Steps to Reproduce Behavior
REFERENCESFor more information about Validation rules, search for "Validation Rule property," and then "ValidationRule, ValidationText Properties" using the Microsoft Access for Windows 95 Help Index. Keywords : kbusage FmsProp TblFldp GnlValid Version : 1.0 1.1 2.0 7.0 Platform : WINDOWS Hardware : x86 Issue type : kbprb Solution Type : Info_Provided |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |