Results 1 to 12 of 12
  1. #1
    REDCLAYGIRL is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    5

    How to change the display of entered data


    I need help changing how my data is displayed. I am entering GPS data with 5 decimal places. However, when I enter the data, the form as well as the table rounds the numbers so I can't see all the decimal places. I have tried going into design view and changing the field properties to display with the decimal places but it still rounds them. For example, I enter 40.63343 and it returns 41.00000. Is there another field that I need to change in order to stop it from rounding?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I use ShortText data type to store coordinates. I use one column for lat and another column for lon. Other columns for other stuff. If you need to do some math, use a Module and VBA. Cast the text to a Double Precision.

  3. #3
    REDCLAYGIRL is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    5
    Thank you. I still can't get it to display my decimal points. I am not an advanced user :-). I am assuming it is storing my data as entered but it just keeps spitting it back out to me rounded.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Look in your table using Design View and determine the data type being used there. Then look at your table in Datasheet View to see what the data looks like. It is possible to get those two steps correct and still see truncated data elsewhere, e.g. a form.

  5. #5
    REDCLAYGIRL is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    5
    ok. the data type is set to NUMBER. the field size is set to DOUBLE, format is set to GENERAL NUMBER, and the decimal places are set to 5. still doing the same thing.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Yeah, so I have found the simplest way to attack this is to store the lat and lon as Text. It makes everything easier, running queries, importing and exporting, etc.

    Then, if you need to use the coordinates in a formula to determine distance or some crazy geometry thing, do it in VBA. Do you data conversion in VBA by Casting the Text Data type to the appropriate Number data type. IIRC, Double precision.

    I looked at the reference material and Double is floating point. So if you start to do some crazy math, you could find some limits with the double.
    https://msdn.microsoft.com/en-us/lib...ffice.15).aspx

    Another option would be to use the Decimal, which can be fixed point.
    https://msdn.microsoft.com/en-us/lib.../gg251687.aspx

    But you do not have to worry about this unless you need to use the lat or lon as an actual number. And then you would just do a type conversion.
    https://msdn.microsoft.com/en-us/lib.../gg278896.aspx

  7. #7
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You could post your dB for analysis.
    Do a Compact and Repair, then Zip it.......

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by ssanfu View Post
    You could post your dB for analysis.
    Do a Compact and Repair, then Zip it.......
    Yeah, REDCLAYGIRL mentioned the table's properties is using format and decimal limits. Those will definitely be downers.

  9. #9
    REDCLAYGIRL is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    5
    Ok. I have not used VBA but sounds like I can use that to convert my stored number data to text, correct? Then I assume it will spit out my stored data in text format with all the decimal places I originally entered?

  10. #10
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Are you getting your coordinates from a single source? If you store them as text, they will be stored exactly how they are entered/imported. So if there are always trailing zeros, your data will include the trailing zeros.

    There are upsides and downsides to either. For instance, text is a larger data type than Double and, therefore, demands more resources. Bottom line, it is easier to convert from text to a Number type, if you find you need it as a number.

    When you start to have your database talk to other databases, you will discover that a double with one technology is not necessarily the same as a double in another technology.

  11. #11
    REDCLAYGIRL is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    5
    Yes it is a single source. I just need to get the existing rounded numbers to display with the decimal points I entered them with. I will change how things are done in the future but right now I just want to see the numbers as they should be.

  12. #12
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    In post #7 Steve offered to take a look at your DB.

    What happens if you right click copy one of the values from within the table while in Datasheet View, then paste it into Notepad? Is this closer to what you need? Do that for several of the values, maybe starting from the top down 10 times or so.

    Make a copy of your DB and work in your copy.

    I would start by removing the formatting and the decimal rules you placed at the Table level. Open your table in Design View and highlight one of the columns you are working with. Then go to the properties section. Change the Decimal Places back to Auto and remove the text from the Format property, then save the table. Open your table in datasheet view and compare the top 10 to your notepad.

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

Similar Threads

  1. Replies: 12
    Last Post: 08-20-2014, 05:26 PM
  2. Replies: 6
    Last Post: 09-26-2013, 10:00 AM
  3. Replies: 5
    Last Post: 08-20-2013, 08:25 PM
  4. Replies: 6
    Last Post: 01-07-2013, 06:41 PM
  5. Replies: 2
    Last Post: 07-30-2012, 03:26 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