Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Decimal Place in text field (Access 2000)

    This is kinda annoying. I have a text field with the format of currency and at 2 decmial places. But when I click the text field, it shows all the decimal places. Is there a way to make just stick to 2 decimal places when modifing the field?

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Decimal Place in text field (Access 2000)

    I think you will have to ensure that the value contains only two decimal places.

    1. Run an update query once that replaces the value of the currency field by its rounded value Round([CurrencyField],2) where CurrencyField is the name of the field.

    2. Put the following expression in the AfterUpdate event of the text box in the form used to enter/edit the value:

    =Round([CurrencyField],2)

    where CurrencyField is the name of the field.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Decimal Place in text field (Access 2000)

    The field format is for display. It does not control the precision of the field (the actual number of decimal places). Since the currency datatype has four decimal places, you will see four decimal places when you edit. Is that a horrible problem?
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Decimal Place in text field (Access 2000)

    Not really, its would just be nice it was always at 2 decimal points

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •