Results 1 to 4 of 4
  1. #1
    drexasaurus's Avatar
    drexasaurus is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Santa Ana, CA
    Posts
    60

    Droping the fraction of a double into an INT

    I have more experience with other computer languages, that, when you cast a double type variable into an integer, you merely lose whatever came after the decimal point.



    Now me having this experience, crafted the solution of a problem that depending on this behavior, only to notice that this function:
    someInt = CInt(4.51) '(or higher)
    will actually round the number to 5 for me. I was depending on the different behavior.

    Any simple way to just lose the decimal?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Look at Int() and Fix().
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    drexasaurus's Avatar
    drexasaurus is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Santa Ana, CA
    Posts
    60
    Thank you!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Double Precision
    By geoff.g in forum Import/Export Data
    Replies: 1
    Last Post: 08-08-2011, 08:26 PM
  2. Double Relational
    By jammmie999 in forum Access
    Replies: 1
    Last Post: 05-19-2011, 01:37 PM
  3. Double Sort?
    By anoob in forum Access
    Replies: 1
    Last Post: 01-18-2011, 12:41 AM
  4. Double Booked
    By Cran29 in forum Queries
    Replies: 0
    Last Post: 01-15-2011, 08:18 AM
  5. Currency Vs Double
    By Mclaren in forum Database Design
    Replies: 1
    Last Post: 08-12-2010, 05:38 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