John Clark
John.Clark at niagaracounty.com
Thu May 13 12:16:45 CDT 2010
Yup...see...I knew it...EASY! Thaks Shamil. I've never had need for this function before...I didn't even know about it. I was looking for "round" or "rnd" (yeah...this would've helped), and never thought of "math.round" I didn't need currency though...it worked out w/out it. And, it isn't a currency calc, although it is used in one. Thanks again! John W Clark >>> "Shamil Salakhetdinov" <shamil at smsconsulting.spb.ru> 5/13/2010 12:44 PM >>> Hi John -- Try to use Currnecy data type in all your calculations, then round result to two digits by using Math.Round(...) function... HTH, Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Clark Sent: Thursday, May 13, 2010 7:38 PM To: Access Developers discussion and problem solving Subject: [AccessD] Number format question Man, this seems like it should be so easy, but I'm missing something... I'm dong this calculation in my program...depending on how many credit hours a student takes, they have an "FTE" value, which is [CredHrs]/30. When this first came to me, these numbers were all in a table, and I was told they were arbitrary, until I discovered that this calculation actually existed. At first I did a DLOOKUP, based on the credit hours, but I had issues w/that (subform issues), so it was obviously much easier to just do the calculation on the form. There is another calculation, which is [ChargbkRate] * [FTE] * ([MonthsCred]/6). The problem is that, because everyone expects the value on the original table, my calcs are coming up slightly off. The example I'll use is this... Chargeback Rate = $2600 Credit Hours = 14 Months Credit (time they've lived in district) is 3 So, the FTE should be .47 ...I am getting .46666666 This is throwing it all off, and my calc is $607 where it should be...w/the correct FTE...$611. I'm also thinking, I'll have more problems if the month is something like 2, which would be .3334, instead of the easy .5 that 3 month presents. So, my question is this...how can I dictate that a number stop at the 2 decimals. It is "double" and I've got 2 decimals already specified. --