Hi, is it possible to use the eval function with variables e.g. Eval("foo + bar") or Eval("""The value of foo is "" & foo")?
This is because I have my database settings in a table (one field having the name of the setting and the other containing the value) and I wish to be able to reference variables in the settings value. E.g., for the "MsgOnExit" setting, I would have the string
Thanks
This is because I have my database settings in a table (one field having the name of the setting and the other containing the value) and I wish to be able to reference variables in the settings value. E.g., for the "MsgOnExit" setting, I would have the string
"Are you sure you would like to exit " & AppTitle
Where AppTitle is the name of the database. I would then plan to use Eval at runtime to evaluate the expression to resolve AppTitle to a value. Of course, this may not be the best example as many would argue AppTitle should be a constant, but there are other settings which rely more heavily on variables being able to be resolved at runtime.
(I'm using a settings table because it allows for a settings GUI and also the ability to variables across sessions.)
Where AppTitle is the name of the database. I would then plan to use Eval at runtime to evaluate the expression to resolve AppTitle to a value. Of course, this may not be the best example as many would argue AppTitle should be a constant, but there are other settings which rely more heavily on variables being able to be resolved at runtime.
(I'm using a settings table because it allows for a settings GUI and also the ability to variables across sessions.)
Thanks