Rounding in Access

  • Thread starter Thread starter Josh
  • Start date Start date
J

Josh

I have a table with a list of products, the amount of inventory I want for Ea
product and what the products order amount is. How do I round the Inventory
I want to keep, to a multile of the standard pack Quantity?
 
Josh

"rounding" is usually reserved for decimal fractions ...

And since we're not there, we can't see how you are keeping track of
products (e.g., your table structure and business rules). Your description
seems to imply that you have individual product counts, but that you also
have a ?PackQuantity?.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Will this do it for you?
Cartons: Int([InventoryCount] / [CartonSize])
or
Cartons: [InventoryCount] \ [CartonSize]
 
I suspect it would be

- cartonSize * int( - inventoryCount / cartonSize )



unless the quantity required is in number of cartons, if so:

- int( - inventoryCount / cartonSize )


with the -int(-x) would return 1, that is, 1 carton, if x = 0.0000001,
as example, rather than returning 0 carton with the simple int(x).



Vanderghast, Access MVP


KARL DEWEY said:
Will this do it for you?
Cartons: Int([InventoryCount] / [CartonSize])
or
Cartons: [InventoryCount] \ [CartonSize]

--
Build a little, test a little.


Josh said:
I have a table with a list of products, the amount of inventory I want
for Ea
product and what the products order amount is. How do I round the
Inventory
I want to keep, to a multile of the standard pack Quantity?
 
Back
Top