Entering numeric data in tables

  • Thread starter Thread starter Arnon
  • Start date Start date
A

Arnon

Is there a way to key in a number into a table, not as raw
data but rather like in Excel, for example 5+2 and then
get the result after losing the focus? The reason that I
need it is that sometimes I need to calculate numbers and
then key them in and for that I use my calculator or
excel. I'd like to simply do it in Access.

Thanks.

Arnon
 
Hi Arnon,

You can use the Eval() function to return the result of
an expression.

You won't be able to use this in a table, but you could
use it in a form. I'm not sure if you can use it
directly in a bound control, but you could definitely use
it in an unbound control. In the exit event of the
control you could type the code:

Me.YourUnboundFieldName = Eval(Nz
(Me.YourUnboundFieldName,0))

If you wanted to automatically assign this value to
another field in the form, you could add another line
such as:

Me.FieldNameToGetValue = Me.YourUnboundFieldName

Hope this helps.

-Ted Allen
 

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