presenting the right value

R

Rani

Hi guys,
I have a field representing the tenth of a number. AKA if the user puts 25
it really should be 0.25

I was trying to use an after update event to control that and entered :
Me.PaymentAddKmDolar = PaymentAddKmDolar / 100

but am not getting anything to be displayed in the field.

what is the correct syntax ?
 
G

Guest

If this is a field linked to a column in a table make sure that the data type of the column is number and you may want to set the decimal places to 2 rather than auto. If this field is not linked to a table then the type of the field would be String so your syntax would need to be:
Me.PaymentAddKmDolar = cstr(clng(PaymentAddKmDolor)/100)
 
R

Rani

I think I misrepresented the issue.
the field is of number type to ease the process on the user, I want them to
enter a hole number (28 for example) and I want the number to present itself
to cents AKA the user enters 28 and gets 0.28 in result.

thanks

Ran

Rich Carroll said:
If this is a field linked to a column in a table make sure that the data
type of the column is number and you may want to set the decimal places to 2
rather than auto. If this field is not linked to a table then the type of
the field would be String so your syntax would need to be:
 

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

Top