Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Math equations in a textbox???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00660635
Message ID:
00660645
Views:
10
In the lostfocus event you could do

thisform.mytextbox.value=STR(VAL(thisform.mytextbox.value))

the entered string would evaluated to a number then translated back into a string to be represented to the user.

>How can I allow users to enter a simple math equation in an input textbox, then evaluate it to a number?
>
>for example: "40.68/3"
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform