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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Imperial Subtraction in Access

Status
Not open for further replies.

plcman

Programmer
Feb 17, 2001
92
GB
Hi

I have create a Inventory database for steel bar which is ordered and withdrawn in feet and inches. Does anybody have any ideas about the best way to proceed. i.e which format should the entries be made and the best way to perform the maths, is it best to convert to mm to do the maths etc

Any ideas greatfully recieved

Regards

Alan Edwards

85% of statistics that are quoted are entirely made up!
 
If both orders and withdrawls are in imperial units there doesn't seem to be much reason to convert from or to metric since it's a floating point conversion factor and therefore susceptible to cumulation of rounding errors.

... Unless of course, you also work with metric orders or withdrawls. If you do then the smallest unit of measure that you can use is probably best (cm or mm). You want to guard against trying to maintain fractional inventory units if possible.

All this brings up the materiality issue. How precise do you need to be? If we are talking about concrete rebar for example, it's really not material if we have 10,000 feet or 10,005 feet in stock. If the bars are platinum however ...

I would keep inventory in inches and use code and/or queries to convert to or from a feet and inches representation.
 
I would keep inventory in inches and use code and/or queries to convert to or from a feet and inches representation.

Same here. You can't use decimal feet because the rounding errors will accumulate.

Data input will be easier if you use a pair of textboxes to get the lengths from the user. If you have a textbox for feet and another for inches then you can do validation on the inches to keep them within the 0..11 range.

Geoff Franklin
 
Hi

Thanks, I need to record down to the nearest inch. My main concern is how the operator is to enter the amounts of stock. EG in one field or split into two fields for feet and inches. My converting to metric idea was just to simplify the maths, there should be no problem with rounding off.

Regards

Alan Edwards

85% of statistics that are quoted are entirely made up!
 
I would never allow a user to directly enter values into a table. Use text boxes or some other appropriate controls on a form where you can validate the entered values before committing them to the database.

Users (bless their tiny hearts) are prone to doing things like interchanging feet and inches; entering negative values; typing non-numerics in numeric only fields ... and a host of other sins that are unpredictable until you actually see them.

Use two text boxes, feet & inches, and do the conversion in your code.
 
Then, there is (of course) the issue of wheather the inventory is "allowed" to be subdivided, and -if so- what is done with the leftover?

Like golem says, ther can be a difference between how you account for lumber and platinum ...




MichaelRed


 
Hi

Thanks for all your comments, I am going to store everything in Inches.

I have the following as the control source for a text box

=Int(nz([UnitsReceived])/12)

I want to also beable to click on this text box, enter a value and do the reverse of the above into [UnitsReceived]. When I try this I just get a windows alarm sound. Anyhelp on this greatfully received.

Regards

Alan Edwards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top