Application.Eval (Access)
You can use the Eval function to evaluate an expression that results in a text string or a numeric value.
You can construct a string and then pass it to the Eval function as if the string were an actual expression. The Eval function evaluates the string expression and returns its value. For example, Eval("1 + 1") returns 2. If you pass to the Eval function a string that contains the name of a function, the Eval function returns the return value of the function. For example, Eval("Chr$(65)") returns "A". If you are passing the name of a function to the Eval function, you must include parentheses after the name of the function in the stringexpr argument. For example:
Eval (StringExpr)
StringExpr: An expression that evaluates to an alphanumeric text string. For example, stringexpr can be a function that returns a string or a numeric value, or it can be a reference to a control on a form. The stringexpr argument must evaluate to a string or numeric value; it can't evaluate to a Microsoft Access object.
' ShowNames is user-defined function.
Debug.Print Eval("ShowNames()")