Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2006

Tip: Looking for answers? Try searching our database.

Seperating Whole Numbers and Decimal Numbers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StuJol - 18 Sep 2006 15:19 GMT
Using vb in access 2003 i end up with a value of 1.006

i need to get the 1 on its own and the 006 on its own. Is there a function
that will remove the numbers to the left of the decimal point and to the
right of the decimal point?
Douglas J. Steele - 18 Sep 2006 15:28 GMT
The Fix function will remove the decimal portion (there's also the Int
function. The difference is how they treat negative values: Int returns the
first negative integer less than or equal to the number, while Fix returns
the first negative integer greater than or equal to number).

Once you've got the integer part of the number, subtract it from the
original number to get the decimal portion.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Using vb in access 2003 i end up with a value of 1.006
>
> i need to get the 1 on its own and the 006 on its own. Is there a function
> that will remove the numbers to the left of the decimal point and to the
> right of the decimal point?
StuJol - 18 Sep 2006 16:01 GMT
Once Again, Many Thanks Douglas

> The Fix function will remove the decimal portion (there's also the Int
> function. The difference is how they treat negative values: Int returns the
[quoted text clipped - 9 lines]
> > that will remove the numbers to the left of the decimal point and to the
> > right of the decimal point?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.