Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding problems

Status
Not open for further replies.

Stuartp

Technical User
Feb 22, 2001
178
GB
I have created a report based on a query of average sales, units in stock and cost price of a product. The query reports the average sales and the units in stock. The report at runtime works out the difference between sales and units in stock and works out the price.

The problem is that the average is rarely an integer. For example it might say that we sell 4.3 of a product and have 2 in stock, therefore we need to buy 2.3 of a product at £1 each. Clearly we cannot buy 0.3 of a product, so I need the price working out using only the whole number component i.e. 2 x 1. At the moment it will say 2.3 X 1 making the price appear wrong.

Is there a way to do this please?

Thanks

Stuart
 
It's OK thanks I remembered the keyword I want - using Int(number) does the trick!

Thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top