making form to perform calculations

D

dotkor

I am trying to make a field in my form to make a calculation of body surface
area. The user inputs height and weight into the neighboring fields

Height: inches Weight: lbs BSA

and i would like then BSA filled in automatically filled using formula:
BSA (m²) = ( [Height(in) x Weight(lbs) ]/ 3131 )½ and then have a cursor
move to the next input field.

Is it possible? I know nothing about VBA programming and this is the only
sophisticated step i have in my form, hardly worth mastering VBA.

Can anyone suggest solution?

Thank you in advance
Dotkor
 
G

Graham Mayor

You don't need vba for this, you can use a formula field. Check the
calculate on exit check box of the weight field (ie the last field that
forms part of the calculation) and insert

{ ={ Height } * { Weight } / 3131 / 2 }m2

where Height & Weight are the bookmark names of the relevant fields and the
2 of m2 is superscripted
You can do much the same with a calculated form field

Check your calculation as the on line calculator I used to check the figures
http://measurementsconverter.com/body_mass_calculator.html gives a different
result?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top