how can I have 1235_.5_ showing just 123.5 ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I hope to be able to explain my problem...
I have a texbox on a form. This text box can have only single values with a
maximum of 2 digit.
I have created this input mask "9999.99;0;_"
But it my happens that user can digit only three of the four integers
avilbale. I mean, it can be entered either 1254.23 or 123.5
In this second case, I would like that on loosing the focus the value showed
will be 123.5 and not _123.5_ or 123_.5 (I'm putting the _ to make things
*clear*).
I would like not to see spaces, wherever they are!

Second question: there is a function to retrieve only the decimal part of a
number? In the example above, something the will retunr 5 from 123.5). i know
there is, but I cannot remember what it was.

Thank you so much,
Nico
 
Second question: there is a function to retrieve only the decimal part of
a
number? In the example above, something the will retunr 5 from 123.5). i
know
there is, but I cannot remember what it was.

number-Fix(number)

123.5-Fix(123.5)=.5
 
I have created this input mask "9999.99;0;_"
But it my happens that user can digit only three of the four integers
avilbale. I mean, it can be entered either 1254.23 or 123.5
In this second case, I would like that on loosing the focus the value
showed will be 123.5 and not _123.5_ or 123_.5 (I'm putting the _ to
make things *clear*).

First of all, I would get rid of the input mask, which IME seems to
create nothing but confusion in the user. If the control is bound to a
numeric field, then Access will check that it's a valid number; if it's
not bound then it is easy to create a ValidationRule or a Before_Update
event to check it.

For display, use the Format property set to something like "0.00" for two
decimal places, and set the TextAlign to right or left depending on what
you like to see.

Hope that helps


Tim F
 
Back
Top