Storing birth weights

YNWA

Registered User.
Local time
Today, 03:15
Joined
Jun 2, 2009
Messages
905
Hi,

I have a field(s) on my form called birthWeightLBs, birhtWeightOZs and also birthWeightGRAMS. Stored in table as the same.

The birth weight is in lbs and ozs. Now on form I have 2 fields which both store those entries into the table in seperate fields.

What I was planning on trying was having a grams field also (as babies are sometimes measured in grams). Is it ok to have another field on the form and in table for grams to be used if needed?

Does anyone have a best way to go about storing weights in one field rather than splitting the lbs and ozs up into two?

Also is it better to have the grams and lbs/ozs seperate and visbale at all times or would it be easier to have like a select weight button, where they check lbs or grams and a box appears based on their selection for them to enter the weight? Thus making the form look a bit tidier?

Sorry if I have confused you.

Thanks
Will
 
How about having a weight field, then a unit of measure field, the unit of measure field could store a fkreference to a pkreference in a unit of measure table that stores, lbs, grams, oz, etc... Then in your form, you could have a combo box that pulls from that UOM table, and when the weight is being entered they would type in the weight in the weight field, and select the UOM.... This would help later if you ever needed to convert them from one to the other UOM.
 
Oh, just read the rest. You could have a form that has two text boxes (unbound), one for lbs and one for oz.... on the record update you could have it convert the lbs to oz and add it to the other text box and then store the total oz in your table record or something like that.
 
The rule of thumb is that you don't store calculated fields, such as your 'grams' field, when the pounds and ounces are entered. But rules are made to be broken, and this may be one of those cases, since you state that "...babies are sometimes measured in grams."

Medicine is one of those fields that has been slow, in this country, to adopt the metric system. Which health care professionals use it and which don't appears to depend on basically on where they were trained.

I'd add the 'grams' field to your table, allowing the users to enter it as grams if that's their preference.


Linq ;0)>
 
The rule of thumb is that you don't store calculated fields, such as your 'grams' field, when the pounds and ounces are entered. But rules are made to be broken, and this may be one of those cases, since you state that "...babies are sometimes measured in grams."

Medicine is one of those fields that has been slow, in this country, to adopt the metric system. Which health care professionals use it and which don't appears to depend on basically on where they were trained.

I'd add the 'grams' field to your table, allowing the users to enter it as grams if that's their preference.


Linq ;0)>

Would it be a good idea to have it convert to oz on record after update, so that everything is stored as oz, and can be converted as needed? Or because of the application to have it done your way?
 
personally i would store the weight in grams (or Kgs) , and then convert to avoirdupois (pounds) if required. Easier to store and use a metric value.

and pounds is roughly something like (Gms /1000) * 2.2
 
THink I'l just go easier and have the 3 fields lbs and Oz then grams next to that. User can pick either or.
 
I would like to stress what others have said... Doing both is a bad idea...

Choose one type to store, doesnt much matter which type, but choose one type to store.

On your form you can have 3 unbound controls for user to choose either of the 2 different weighing systems but convert them into 1 field, 1 type... to be stored in your db

I do not know or even understand how lbs and oz work .... Would this be feasable...
Make one decimal field and an aditional field Grams/LBs
For LB/oz you have something like 5.3 mean 5 lbs, 3 oz
Where as for grams you have 5.3 just mean just that 5.3 kg (yeah I know one big whopper of a baby)

This might confuse people to much though and might be prown to errors (early on) but does 'push' people using this to using the KG rather than LBs since it is the default setting.
 
I would like to stress what others have said... Doing both is a bad idea...

Choose one type to store, doesnt much matter which type, but choose one type to store.

On your form you can have 3 unbound controls for user to choose either of the 2 different weighing systems but convert them into 1 field, 1 type... to be stored in your db

I do not know or even understand how lbs and oz work .... Would this be feasable...
Make one decimal field and an aditional field Grams/LBs
For LB/oz you have something like 5.3 mean 5 lbs, 3 oz
Where as for grams you have 5.3 just mean just that 5.3 kg (yeah I know one big whopper of a baby)

This might confuse people to much though and might be prown to errors (early on) but does 'push' people using this to using the KG rather than LBs since it is the default setting.

Sorry I am lost now.

The user needs to enter a birth weight, they either measure in Lbs and oz's or they measure in grams, it all depends on the person entering the data.

I need both options to be available for them to pick one to enter into.

I will only be storing 1 entry as if they pick grams it will be grams only, if they pick lbs/oz that will be technically 2 entries as its 2 fields.

You can't have 5.3 to mean 5lbs 3oz as the weight could be 5lb 12oz so 5.12 will not work.
 
Why bother with lbs and oz's just store ounces.

16 ounces make one pound so if you store 50oz in your table

Pounds = Int(50/16)

Ounces = 50 - (Pounds*16)

Having calculated the pounds and ounces from the total ounces you can then diplay them on your form

Me.Weight = Pounds & "lbs " & ounces & "ozs"

Ok I have not dealth with zero pounds or ounces but you get the drift.
 
What I am trying to say is ... theoretically you can have 10 or so measurement types...
I.e. Grams, Kilograms, Tons, Micrograms

Now you can allow the user to enter which ever way they want however inside the DB/inside the table, the need only be one field to store your data.
I.e. My column will store grams, thus data enter in Kilograms will be devided by 1000 before storing into my 1 column.

If you keep 2 or in this idea 10 columns your gonna have to have always 1 column empty which as a general design pov is a bad thing.
Both columns are basicaly the same "Birth weight", just have different measures.
A different measure should not be a reason to create an additional column.
 
Why bother with lbs and oz's just store ounces.

16 ounces make one pound so if you store 50oz in your table

Pounds = Int(50/16)

Ounces = 50 - (Pounds*16)

Having calculated the pounds and ounces from the total ounces you can then diplay them on your form

Me.Weight = Pounds & "lbs " & ounces & "ozs"

Ok I have not dealth with zero pounds or ounces but you get the drift.

But on the form, I still need the lbs and oz fields. As the people using this would be health visitors to enter a babies weight. I can do all the calcs no problem, but I still need the user to be able to enter say 11lbs 12oz.

If I just allow entries in ounces, then every user will have to convert lbs to ozs then enter a full amount, they will complain about doing this for every baby surely?

Have a read you incorrectly?
 
What I am trying to say is ... theoretically you can have 10 or so measurement types...
I.e. Grams, Kilograms, Tons, Micrograms

Now you can allow the user to enter which ever way they want however inside the DB/inside the table, the need only be one field to store your data.
I.e. My column will store grams, thus data enter in Kilograms will be devided by 1000 before storing into my 1 column.

If you keep 2 or in this idea 10 columns your gonna have to have always 1 column empty which as a general design pov is a bad thing.
Both columns are basicaly the same "Birth weight", just have different measures.
A different measure should not be a reason to create an additional column.

When babies are born they are weighed in lbs/oz or grams. There the only ones the users will be using.

If the user has a measurement in grams, and I have the lbs/oz fields, how do they go about it without converting their weights? Which will be a pain for the amount of measurements they do. Same goes for lbs/oz, how can they enter it without converting to grams?

All I want the user to be able to do is go to the form, look at their measurement and choose to enter it into the appropriate measurement field either grams or lbs/oz.
 
Ok

You have to text boxes and one option group on your form

Option Group

Metric
Imperial

Textbox 1
TxtLarge

Textbox 2
TxtSmall

The user first indicates which measure they will be using Metric or Imperial (Kgs or pounds/ounces)

The use the afterupdate event of the two textboxes to calculate the combines weight

In your table you have two fields

FldMeasurement
FldWeight

Now depending on which measurement has been adopted you can calculate out the weight

The contents of the FldWeight will be expressed in total grams or ounces.
 
Ok

You have to text boxes and one option group on your form

Option Group

Metric
Imperial

Textbox 1
TxtLarge

Textbox 2
TxtSmall

The user first indicates which measure they will be using Metric or Imperial (Kgs or pounds/ounces)

The use the afterupdate event of the two textboxes to calculate the combines weight

In your table you have two fields

FldMeasurement
FldWeight

Now depending on which measurement has been adopted you can calculate out the weight

The contents of the FldWeight will be expressed in total grams or ounces.

Hi David,

Thanks for your help. This sounds good, but I do not have a clue how to implement it. So heres my dummys reading of it.

1. Create a radio button for the user to select imperial or metric
2. Create 2 text boxes (what is txtLarge and txtSmall?)
3. Write some VBA code to convert the weight in the textbox to either grams or ounces. (Not got a clue what code I would need here either).

Would the 2 text boxes alway be visible? So the user can enter lbs and oz? If the user selected KGs, would only one box be visible?

cheers
 
I am basicaly trying to convey the same as David is ... so I am going to leave it to him.
 
Herre is a very crude example of what I was trying to get over to you. You will need to manipulate it to suit your needs.
 

Attachments

Herre is a very crude example of what I was trying to get over to you. You will need to manipulate it to suit your needs.

Cheers, do you have this is 2003 version?
 
i am sure modern health workers use Kgs and centimetres.

their scales MUST be calibrated in kilos

The UK is now metricated

I would make them go that way.

dont pander to old fashioned midwives.
 
Check this out, you will need to add some code to validate the data and ensure that a weight is recorded before allowing navigation to another record.

I've used an option group to select the measurement units and then a couple of unbound text boxes to enter/display the weight according to the option group, which can be clicked to change the display weight once a weight has been recorded.
 

Attachments

Users who are viewing this thread

Back
Top Bottom