L
Leon L
Hi,
In a VBA routine I want to check a value against a field.validationrule, but
I don't know how to implement this in a generic way (maybe with Eval()?).
Example:
A field called "ABC" with validationrule: "A" or "B" or "C"
Now I want to check if a VBA variable complies to this rule.
The only way I see is to parse the validationrule string and change it so
that I get something like:
(pseudocode)
If var="A" or var ="B" or var="C" then
OK
else
not OK
end if
But this technique is probably getting too complex to use it in a generic
way for all possible validationrule expressions. Would there be a way to use
Access builtin functionality to evaluate the expression?
Any suggestions are welcome!
Leon
In a VBA routine I want to check a value against a field.validationrule, but
I don't know how to implement this in a generic way (maybe with Eval()?).
Example:
A field called "ABC" with validationrule: "A" or "B" or "C"
Now I want to check if a VBA variable complies to this rule.
The only way I see is to parse the validationrule string and change it so
that I get something like:
(pseudocode)
If var="A" or var ="B" or var="C" then
OK
else
not OK
end if
But this technique is probably getting too complex to use it in a generic
way for all possible validationrule expressions. Would there be a way to use
Access builtin functionality to evaluate the expression?
Any suggestions are welcome!
Leon