Results 1 to 4 of 4
  1. #1
    mgalvinjr is offline Novice
    Windows 10 Access 2019
    Join Date
    Apr 2023
    Posts
    1

    Combo box will not display 3 decimal number in drop down list.

    I have a table, ComponentFixed:
    > Field name: ID. Date Type: number. Field size: double. Format: Fixed. Decimal Places: 3
    > Field name: Component. Data Type: short text.


    Rows:
    ID   Component
    1.001  Roof
    1.002  Flat Roof
    2.001  Road


    99.999  Building


    I created a blank form. In design mode, I dragged a new combo box ontoit and used the combo box wizard. I chose my only table (above), I choseboth fields from the table (ID, Component), then the wizard displayed thecontents of both fields to allow me to adjust the column widths. At thispoint I noticed that the ID displayed the above numbers as follows: 1.001, 1.00, 2.00, 100.00. This is not the 3 decimal display Iexpected.


    When I opened the form and dropped down the combo box list, the ID numberswere displayed as: 1.00, 1.00, 2.00, 100.00.


    How do I get the combo box to display the numbers with 3 decimals as used inthe underlying table?


    Note: I did the same as above without using the Wizard and got thesame results.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I change field properties to no Format and Auto DecimalPlaces and then numbers displayed properly.
    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.

  3. #3
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,159
    I would also not use a double as an ID field, use a decimal data type.
    You can get rounding errors with doubles, meaning if you used it in a join you could get odd results.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,573
    I would have a standard autonumber ID and your ID field with a name that is meant to indicate what it actually is.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 10
    Last Post: 03-15-2020, 01:46 AM
  2. Drop list/combo box
    By gsucin in forum Programming
    Replies: 4
    Last Post: 10-29-2016, 06:44 AM
  3. Replies: 1
    Last Post: 04-29-2016, 01:32 AM
  4. Replies: 7
    Last Post: 10-26-2011, 01:47 PM
  5. Drop-Down list to display remaining text.
    By mnsemple83 in forum Forms
    Replies: 3
    Last Post: 07-18-2011, 10:29 AM

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