Calculated field in Access

Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jun 2009
Posts: 1
Reputation: mars964 is an unknown quantity at this point 
Solved Threads: 0
mars964 mars964 is offline Offline
Newbie Poster

Calculated field in Access

 
0
  #1
Jun 14th, 2009
Hello,

This was supposed to be easy but I could not get it!
I need to create a calculated field in Access (preferably in a table or maybe a query) that calculates the BMI. I have fields for the weight in kgs and Height in cm. The formula is:
BMI=(Wt(in kg)/(Ht (in meters)^2)). However, as the height is stored in cm I need to convert it to meter. And also, I need the BMI with only 1 decimal place (for example: 23.6)
I came up with the expression:
=([Tbl1]![weight])/(([Tbl1]![Height]/100)^2)

Can anyone help!
Thank You.
Mona
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 1
Reputation: hiền muội is an unknown quantity at this point 
Solved Threads: 0
hiền muội's Avatar
hiền muội hiền muội is offline Offline
Newbie Poster

Re: Calculated field in Access

 
0
  #2
Jul 7th, 2009
Try code:
=FormatNumber(([Tbl1]![weight])/(([Tbl1]![Height]/100)^2) ,1)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC