Re: Small textbox width forces rounding.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi -

Sounds as if the format property for the textbox may be incorrect. Try setting the format to Fixed, and the decimal places to 1 (or whatever you require)

P.S. If you widen the textbox, do you see 10.5 or 11?


John


Ray Cacciatore wrote:
I actually have it defined as Double at the table level where the Decimal property is set to Auto. What's weird is that I see 11 in the textbox but the moment I put the cursor in the textbox the value changes to 10.5. The value that's being stored in the table is 10.5 which is what I want. But the moment the cursor leaves the textbox, it goes back to 11.

"Al Campagna" wrote:


Ray,
It's not the width of the text control that's forcing 10.5 to 11, it's the field definition in your table. You probably have it set to to Byte or Integer, which means there can be no decimal places.
Try defining that field as Single. Also, format the form field for as many decimal places as you want to display.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Ray Cacciatore" <RayCacciatore@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:C14F342B-8E29-43CB-B2CD-5CA3B85DF42F@xxxxxxxxxxxxxxxx

I have a textbox with a small width that fits only two digits. When I try to
enter 10.5 in the textbox, Access rounds it to 11. Is there a way to prevent
it from rounding automatically, I don't mind that 10.5 be clipped.




.



Relevant Pages

  • Re: Use TextBox Text As Function Name!
    ... the text in the TextBox changes to "<the name of the ... > OptionButton that was checked just before the selection change>2<the ... You have some design issues here. ... using the most common format. ...
    (microsoft.public.vb.general.discussion)
  • Re: Newbie question on formatting a field in table design
    ... Each department field is set to the default format ... multiplies the number entered by 100 and adds the "%" sign. ... right of the textbox, then store the number that way and do the ... normalized table design would convert your 11 ...
    (comp.databases.ms-access)
  • Re: Custom Cell Format problem
    ... I am having trouble with this "raw" TextBox. ... when I paste the contents of the UserForm into a new row on the sheet ... I have raw data in the format of 3 numbers, ...
    (microsoft.public.excel.programming)
  • Re: unicode textbox problem
    ... I get the data in the above format from SQL server. ... If I move the same data into an asp:textbox, or an html input textbox, I ... But I need this to show the Chinese characters. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Small textbox width forces rounding.
    ... If you set the format to Fixed and the decimal places to 1,, you will get all the decimal places, but the text will wrap in the box. ... Sounds as if the format property for the textbox may be incorrect. ... It's not the width of the text control that's forcing 10.5 to 11, it's the field definition in your table. ... Candia Computer Consulting - Candia NH ...
    (microsoft.public.access.forms)