How to Evaluate Math Expression Stored As Text

  • Thread starter Thread starter Altemir
  • Start date Start date
A

Altemir

I have a text form control whose values contain mathematical
expressions. For example, the control might contain the string value
"2*4+6". Is there an easy way to evaluate this value mathematically
and display the result (e.g., "14") in another form control?
 
Altemir

You can use the eval function in the afterupdate event of the input field.

result_field=eval(me!input_field)
 
Back
Top