ACC: Parameter Limit for Functions in ValidationRule Property (105127)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
This article was previously published under Q105127
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
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.
CAUSE
You 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.)
RESOLUTION
You 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.
REFERENCES
For more information about Validation rules, search for "Validation Rule
property," and then "ValidationRule, ValidationText Properties" using the
Microsoft Access for Windows 95 Help Index.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbprb kbProgramming kbusage KB105127 |
---|
|