Results 1 to 6 of 6
  1. #1
    Doobiem is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    3

    what is the correct field specification in order to input measurements like 32.15 ?

    hello all,
    I am working on my first access project. have defined some fields as numbers but when i try to input my measurements, it rounds automatically.
    any suggestions?
    thanks,


    Doobie

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Using integer or Long integer will only allow whole numbers
    Instead use one of single, double or decimal number datatypes depending on the number of significant digits/decimal places/precision required and whether you need to use that data in further calculations
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    Doobiem is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    3
    Thanks for the quick response - it works

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I've oft read that double is recommended over double

    https://www.fmsinc.com/MicrosoftAcce...type/index.htm
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Micron
    I'm seeing double.
    Unless you have very big numbers or need a large number of d.p., single is often sufficient and would be in this case.
    Normally I use double myself but it can lead to floating point errors. For example

    Code:
    X=0.000000000000008
    Y=1
    ?X+Y
     1.00000000000001
    ?X-Y
    -0.999999999999992 
    In this example X+Y is rounded but X-Y is not

    For more info see
    https://docs.microsoft.com/en-us/off...ccurate-result
    http://www.net-informations.com/q/faq/float.html
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  6. #6
    Doobiem is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    3

    can calculations be performed using different number types?

    Quote Originally Posted by isladogs View Post
    Using integer or Long integer will only allow whole numbers
    Instead use one of single, double or decimal number datatypes depending on the number of significant digits/decimal places/precision required and whether you need to use that data in further calculations
    Hello again,

    when I have some fields where decimal digits are of significance (no more than 3 places), and some other when whole numbers are in use, can i define calculations based on mixed field types?
    what should the calculated field type be?

    Thanks,
    Doobie

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

Similar Threads

  1. Replies: 6
    Last Post: 09-04-2018, 08:39 AM
  2. Replies: 18
    Last Post: 03-18-2016, 07:28 PM
  3. Replies: 1
    Last Post: 10-05-2013, 04:56 PM
  4. Replies: 7
    Last Post: 10-24-2012, 05:22 PM
  5. Replies: 0
    Last Post: 12-11-2006, 04:55 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