Results 1 to 4 of 4
  1. #1
    jlindquist23 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jan 2019
    Posts
    43

    Decimal Problems populating a combo box


    Hello!
    I'm using a combo box to populate fields in my database.
    Click image for larger version. 

Name:	Capture.PNG 
Views:	12 
Size:	9.6 KB 
ID:	38365 This table is linked to a larger database and is a text field.
    The text field has decimal "like" values. .4, .5, 1.5, etc.

    I'm using a combo box, marked as 1 below, to populate the PinDia field in my form.
    Click image for larger version. 

Name:	Capture2.PNG 
Views:	12 
Size:	24.6 KB 
ID:	38366
    When the data comes in, it truncates the vale to an integer. How do I stop this from happening?
    So... the .4 comes in as a zero. 1.5 comes in as a 1.0.

    The table I'm pulling it from shows all the data correctly.
    Click image for larger version. 

Name:	Capture3.PNG 
Views:	12 
Size:	7.6 KB 
ID:	38367

  2. #2
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    If the picture is of your table then the fact the numbers are left aligned would indicate access thinks they are text.
    So this is possibly your issue. If not try changing the decimal places on the form to 2 or 3?
    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 ↓↓

  3. #3
    jlindquist23 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Jan 2019
    Posts
    43
    Yes!
    Thank you!
    I need to change the data type of the table it is coming in to.
    Right now I have it as a number. I need to change that.
    Thanks for your help!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Should be Number type with FieldSize Double, not Integer.
    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.

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

Similar Threads

  1. Replies: 5
    Last Post: 05-01-2017, 06:17 AM
  2. Convert decimal comma to decimal point
    By Hans Karlsson in forum Programming
    Replies: 3
    Last Post: 06-30-2014, 01:56 PM
  3. Replies: 1
    Last Post: 09-16-2013, 02:37 PM
  4. Populating combo box
    By lugnutmonkey in forum Forms
    Replies: 3
    Last Post: 01-10-2013, 04:54 PM
  5. Replies: 2
    Last Post: 08-16-2012, 10:02 PM

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