[AccessD] Decimals Problem

Rocky Smolin rockysmolin at bchacc.com
Wed Sep 16 10:16:08 CDT 2015


Quantity on hand on a lot of businesses needs fractional quantities.  So we
have to allow for that.  (This is a commercial app - goes to lots of
different companies.)

Actually I'm not sure how they generate those numbers with a bunch of
decimal places but we can't change the field in the table to currency data
type as other users may want to display more or fewer decimal places.  

TIA

Rocky


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Charlotte Foust
Sent: Wednesday, September 16, 2015 8:03 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Decimals Problem

How can quantity on hand be a fraction?  If it's the result of a calculation
of some sort, using the Currency data type will eliminate the extra
decimals.


Charlotte Foust
(916) 206-4336

On Wed, Sep 16, 2015 at 7:53 AM, Rocky Smolin <rockysmolin at bchacc.com>
wrote:

> Dear List:
>
> In an app there's a text box bound to a quantity on hand field.  
> Sometimes there is no exact equivalent in hex of a decimal fraction 
> value.  So instead of showing 150 the box shows 149.998475.  There is 
> a user-specified preference in a table specifying the number of 
> decimal places to display.
>
> Problem 1: If I set this in the property sheet instead of through code 
> in the _Open event, it works.  Setting the .DecimalPlaces property in 
> code does not work in the case of 149.998475.
>
> Problem 2: Even if I can get the number to display as 150 by setting 
> the .DecimalPlaces property to zero, when I click into the text box 
> the number changes from 150 to display 149.998475.
>
> Problem 3, the user I think will want one or two decimal places to 
> show wherever quantity on hand shows in the app - but not sure.  Maybe 
> they'll buy off on zero places.
>
> Any leads on how to solve this greatly appreciated.
>
> MTIA
>
> Rocky
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list