We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Access Database help

Does anyone know how I can calculate a BMI in an access database? I soould like to enter the height and weight and then a formula to work out BMI - are there any pro's out there? :o

Comments

  • mrscruffy
    mrscruffy Posts: 221 Forumite
    Simple: BMI = kg / m*m

    You need to record weight (in kg) and height (in meters) in a table

    SELECT weight / (height * height) FROM People;
  • Use excel then import the table into access
  • Bebs
    Bebs Posts: 233 Forumite
    mrscruffy wrote: »
    Simple: BMI = kg / m*m

    You need to record weight (in kg) and height (in meters) in a table

    SELECT weight / (height * height) FROM People;


    Thank you - I don't completely understand, do I put in a weight field, then a height field and then runa query to get the BMI? Sorry, I'm still learning :o
  • fenlander_uk
    fenlander_uk Posts: 635 Forumite
    Part of the Furniture 500 Posts Name Dropper
    edited 3 November 2010 at 2:32PM
    I'm not sure why you're using a database for this.

    As a one-off calculation it can be done in a moment using the Windows calculator.

    If you want to keep records of the BMI of a number of people - and that is the principal item of information you're interested in - then an Excel spreadsheet holding, for example, name, height and weight in columns A-C, then a calculated value for BMI in col. D, is all you need. You could include other personal details in other columns if required.

    If, say, you want to keep the membership records for a gym, to include name, address, phone, DOB, gender, classes taken, subscription payments, etc., then fields for height and weight would make sense. If you wanted to track the evolution of a member's BMI as his/her weight changed, you would need to keep either the calculated BMI value or the height and weight values in a separate linked table where you could store multiple values related to each individual membership record, together with the dates they were recorded. This is clearly a bigger undertaking in programming terms, but it is the one where using a powerful tool like a relational database (Access), begins to make sense.

    It seems from the wording of your enquiry, that the Excel solution might be what you actually need, rather than one based on Access.
  • Bebs
    Bebs Posts: 233 Forumite
    I'm not sure why you're using a database for this.

    As a one-off calculation it can be done in a moment using the Windows calculator.

    If you want to keep records of the BMI of a number of people - and that is the principal item of information you're interested in - then an Excel spreadsheet holding, for example, name, height and weight in columns A-C, then a calculated value for BMI in col. D, is all you need. You could include other personal details in other columns if required.

    If, say, you want to keep the membership records for a gym, to include name, address, phone, DOB, gender, classes taken, subscription payments, etc., then fields for height and weight would make sense. If you wanted to track the evolution of a member's BMI as his/her weight changed, you would need to keep either the calculated BMI value or the height and weight values in a separate linked table where you could store multiple values related to each individual membership record, together with the dates they were recorded. This is clearly a bigger undertaking in programming terms, but it is the one where using a powerful tool like a relational database (Access), begins to make sense.

    It seems from the wording of your enquiry, that the Excel solution might be what you actually need, rather than one based on Access.


    Thank you for your help, I unfortunately have to have it in an access database as it is an audit of patients and the Consultants want an access database, we will be collecting a lot of other information such as operations etc What we need is to calculate the BMI of all patients, they will provide the height and weight and the BMI can be calculated at a later stage - hope this makes sense.
  • It seems that you may want to produce reports containing the BMI data. You should add a Text Box/Label pair with the caption in the label as "BMI". In the text box, the recourd source should use the formula: =[weight]/(]height]*[height]) but ensuring that the field names for Weight & Height match the formula.

    you could also create a query to ouput the data making sure that you add both weight & height fields in your query. Then to calculate the BMI use the following:
    BMI: [weight]/(]height]*[height]

    This will give you the BMI with the heading BMI rather than Expr1.
  • Bebs
    Bebs Posts: 233 Forumite
    It seems that you may want to produce reports containing the BMI data. You should add a Text Box/Label pair with the caption in the label as "BMI". In the text box, the recourd source should use the formula: =[weight]/(]height]*[height]) but ensuring that the field names for Weight & Height match the formula.

    you could also create a query to ouput the data making sure that you add both weight & height fields in your query. Then to calculate the BMI use the following:
    BMI: [weight]/(]height]*[height]

    This will give you the BMI with the heading BMI rather than Expr1.

    Thank you so much :T
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.5K Banking & Borrowing
  • 253.7K Reduce Debt & Boost Income
  • 454.5K Spending & Discounts
  • 245.5K Work, Benefits & Business
  • 601.5K Mortgages, Homes & Bills
  • 177.6K Life & Family
  • 259.5K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.