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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top