JWColby
jwcolby at colbyconsulting.com
Fri Feb 2 09:12:02 CST 2007
Them's the ones. I could not find FIX to save my soul. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, February 02, 2007 9:56 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Break a float into it's parts Use Fix() for the integer part. (Int() will screw up on negative numbers) Use Abs(myNum - Fix(myNum)) to return the decimal part - assuming you always want the decimal part positive. On 2 Feb 2007 at 9:37, JWColby wrote: > How do I get the integer part and the decimal part of a floating point > number > > 23.456 > > how do I get the 23 > how do I get the .456 > > Using clng for example "rounds" the number up or down which isn't what I > want for the integer portion > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- Stuart -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com