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

Manipulating records mathematiclly

Status
Not open for further replies.

Layth

IS-IT--Management
Jun 7, 2005
44
US
I'm working on an access database where I need to manipulate some fields mathematically and either return the result in a new field or table or query. For instance I have a table that has a field of millimeters that I need to convert to inches. An additional problem is that the millimeters are listed up to 10 decimal points and I only need 2 decimal points for the conversion.

I know the conversion, but how do I use the data perform the equation and return the result, can I use a query or can I code it with visual basic, and what exactly is the code for doing this.

Many thanks for all of your help,

Layth
 
Do you mean that you want the result in inches to 2dp or do you mean that want to use the mm field after it has been rounded/truncated to 2 DP (or both).

If you just want the result to 2dp then you can create a new query based on the table containing the mm value and add a new column:
cvInch:round([millimeterfield]/25.4,2)
 
I need the result in inches to 2dp from a mm field that stays at its original, not rounded or truncated.

Thanks
 
Is there a round-up so that 4.1 would round up to 5?
 
Hey Thanks, this works perfectly.

Layth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top