merge two field value in one field in access (1 Viewer)

sharad.sony

New member
Local time
Today, 19:58
Joined
Apr 6, 2016
Messages
3
:confused::confused:
I have a table in access which contains 3 columns named A, B & C.

I want that when i put the value in column A & B the value of column C automatically merge and shows as A + B in table.

How can i do this.


Sharad.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 14:28
Joined
Jul 9, 2003
Messages
16,244
See Attached Sample DB ... ... ..
 

Attachments

  • Merge_1a.zip
    17 KB · Views: 106

nyaworld

Registered User.
Local time
Today, 09:28
Joined
Nov 18, 2015
Messages
24
See Attached Sample DB ... ... ..


I need help with something more challenging....

A=weight
B=height

A is number, B is number and I need the following output in a calculated field, C:

Weight is: 200 lbs. Height is: 60 inches BMI is : 20.5 39.1

I want the above statement to be in one field.... field C

The BMI is calculated like this ([Weight (lbs)],10),1,4)+(703*([Weight (lbs)])/([Height (in)]*[Height (in)

Those fields are A and B.

:confused:
 
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 14:28
Joined
Jul 9, 2003
Messages
16,244
I need help with something more challenging....

A=weight
B=height

A is number, B is number and I need the following output in a calculated field, C:

Weight is: 200 lbs. Height is: 60 inches BMI is : 20.5

I want the above statement to be in one field.... field C

The BMI is calculated like this ([Weight (lbs)],10),1,4)+(703*([Weight (lbs)])/([Height (in)]*[Height (in)

See video instructions on how to put a formula into a calculated field in MS Access I have based the formula on body mass index formula I found online not the formula you provided because that's not a formula! There's something wrong with it.

YouTube Video HERE:-
Calculate BMI Body Mass Index in MS Access
 
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 14:28
Joined
Jul 9, 2003
Messages
16,244
By the way I found this video on YouTube Calculate BMI - The Body Mass Index Formula

The formula I used is used in this Video. I used their calculation in the sample database "200lb X 70In and it came out to 28.7, the same as they show in the video.

I don't know where you got your Body in Mass Index calculation from? Your formula as well? All seems strange? And the example you have given just doesn't tally up.... Weight is: 200 lbs. Height is: 60 inches BMI is : 20.5 NO! It comes out at nearly 40 not 20....
 

nyaworld

Registered User.
Local time
Today, 09:28
Joined
Nov 18, 2015
Messages
24

The formula I am using is correct, I just didn't run the weight and height via my formula when I was giving an example.

The BMI result from formula for 200lbs and 60" is 39.1

I eventually figured out the correct expression in my calculated field:

IIf([Height (in)]=0,"Missing Height","Height: "+SubString(Right([Height (in)],5),1,5)+" in. Weight: "+SubString(Right([Weight (lbs)],5),1,5)+" lbs. BMI: "+SubString(Right(((703*([Weight (lbs)])/([Height (in)]*[Height (in)]))),10),1,4))

Thanks for your responses !
 
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 14:28
Joined
Jul 9, 2003
Messages
16,244
Please ..... your original formula as posted was NOT correct.

It didn't have "IIF" in it...
It didn't have "Missing" in it...
It didn't have "Substring" in it...

Sent from my SM-G925F using Tapatalk
 

nyaworld

Registered User.
Local time
Today, 09:28
Joined
Nov 18, 2015
Messages
24
Please ..... your original formula as posted was NOT correct.

It didn't have "IIF" in it...
It didn't have "Missing" in it...
It didn't have "Substring" in it...

Sent from my SM-G925F using Tapatalk

The original formula works for one calculated field. I then added the IIF statement because you can't divide by zero and what I posted afterwards was the final formula I finally figured out to combine 3 different fields including the original formula for BMI and has a result of "Missing height" when the medical assistant skips adding the value for height.

Thank you for your efforts. :)
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 14:28
Joined
Jul 9, 2003
Messages
16,244
Look.... your formula as posted didn't work. Put your hands up and say sorry, or just forget about it, but don't keep arguing that it was OK ....

Sent from my SM-G925F using Tapatalk
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:28
Joined
May 7, 2009
Messages
19,169
what is the correct formula without coding:

Bmi = 703 x height / weight * weight (am i correct?)
 

sharad.sony

New member
Local time
Today, 19:58
Joined
Apr 6, 2016
Messages
3
Correct. BMI formula is
 

Attachments

  • images.png
    images.png
    3.8 KB · Views: 154

Users who are viewing this thread

Top Bottom