Hi
I’ve got some code-testing code that needs to use the eval command to evaluate strings as code.
I’ve narrowed it down to actions that use array types. Here’s a one liner that fails:
b = Eval(“ubound(Array(1, 2, 3))”)
It throws run-time error 2425 – “The expression you entered has a function name that Microsoft Access can’t find”
Of course, this works fine in Interactive mode:
? ubound(Array(1, 2, 3))
2
Strangley, if I use Evaluate I get a slightly different error:
b = Evaluate(“ubound(Array(1, 2, 3))”)
? b
Error 2029
What’s the difference between eval and Evaluate?
It’s in Access 2002; don’t know whether it’s a problem in other versions or other applications.
Any ideas welcomed.
Peter