Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eval function

Status
Not open for further replies.

cochise

Technical User
Mar 27, 2001
171
US
I have a form that has controls of the standard format. How do I properly use the Eval function if I want to type '10+50+15' and have 75 stored in my table?

Do I set an Event procedure for OnExit:

Me.txtEval.value = Eval( ??????? )

What do I use here?
 
My actual problem is that the fields in the form/query/table are singles. I know that Eval takes text. Most of the time the users are going to enter a single value, but at times, may need to use the eval function.

What is the most efficient way of going about this?

The problem is that the stored values need to be numbers so they can be used in mathmatetical expressions.

Is there a way to use an IF statement on an Event procedure that would evaluate whether the value was a string or number and still be able to use the Eval function?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top