Results 1 to 11 of 11
  1. #1
    boflhusr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2020
    Posts
    10

    Simple, simple question: how do I display a number with two decimal places

    It's been a looooong time since I used Access. I'm creating a new table.



    In Access 2013, how does one display 12.34? I have a field called DividendYield. When I enter 10.99, I only get '10' in the field. The decimals get truncated.

    The Data Type of the field is 'Number'.

    In Field Properties (Design View), I already have my Field Size as 'Decimal' and my Format is 'Fixed'.

    Thanks.

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,564
    Hi

    Change the Data Type to Currency and make the Format - Standard

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725

  4. #4
    boflhusr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2020
    Posts
    10
    Quote Originally Posted by orange View Post
    Remove Fixed from Format.
    Try Decimals Auto.
    Thanks. Where do I find 'Decimals Auto'? I'm using Access 2013.

    Click image for larger version. 

Name:	Access - data format01.jpg 
Views:	10 
Size:	94.0 KB 
ID:	41313
    Last edited by boflhusr; 03-14-2020 at 11:46 PM. Reason: Added picture

  5. #5
    boflhusr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2020
    Posts
    10
    Quote Originally Posted by mike60smart View Post
    Hi

    Change the Data Type to Currency and make the Format - Standard
    The field is not Currency. The DivYield field is a percentage number ie. dividends paid/stock price. The result is manually entered from a web listing ie. it is not a calculated field. Thanks.
    Last edited by boflhusr; 03-15-2020 at 12:03 AM. Reason: Typo correction

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,914
    Sounds like field was set as integer FieldSize

    DecimalPlaces property has Auto.

    If you always want 2 decimal places, including ending 0, need fixed Format.

    Sounds like double FieldSize, fixed Format, 2 DecimalPlaces should work.

    Aside from FieldSize, I seldom format fields in table. I format in textboxes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    255
    If you attach an example file it is easier to see if there are errors and to help you.

  8. #8
    boflhusr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2020
    Posts
    10
    @June7, I'm tempted to just make the field a 'text' data type, but I can't believe it can't be done. I've done it before -display a number like 12.34. I just don't remember how to do it. The reason I want it to have a number is because I want to calculate the average for the field eventually.

    So what is your specific suggestion?

    Did you include instructions how to attach a file in the forum? Why? Did my screen cap not work?

  9. #9
    boflhusr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2020
    Posts
    10
    Quote Originally Posted by June7 View Post
    Sounds like field was set as integer FieldSize

    DecimalPlaces property has Auto.

    If you always want 2 decimal places, including ending 0, need fixed Format.

    Sounds like double FieldSize, fixed Format, 2 DecimalPlaces should work.

    Aside from FieldSize, I seldom format fields in table. I format in textboxes.
    What should the Data Type be?

    In the field's Field Properties dialog box what should I enter in as the Field Size and Format?

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,914
    Use Number DataType (I never use Currency).

    I already said what you should use for field properties: Double FieldSize and Fixed Format and 2 DecimalPlaces.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    boflhusr is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2020
    Posts
    10
    Quote Originally Posted by June7 View Post
    I already said what you should use for field properties: Double FieldSize and Fixed Format and 2 DecimalPlaces.
    It worked. Thank you!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-10-2017, 07:52 PM
  2. Replies: 4
    Last Post: 07-14-2016, 10:05 AM
  3. Replies: 2
    Last Post: 10-21-2013, 01:23 PM
  4. Decimal Places
    By momodoujimnjie in forum Access
    Replies: 1
    Last Post: 01-09-2013, 04:49 AM
  5. Replies: 0
    Last Post: 01-30-2012, 01:20 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums