Oz's to 10th of a Lbs

K

KAnoe

I track bass tournaments and I would like to start keeping a record in a db.
As it is now the scale that we use is in lbs and Oz. I need to put the weight
into the db as a whole number and tenths format. So the scale would show
10lbs 8oz and I would enter 10.5 Lbs.

Can I set up a field that I could just put in the OZs and it would give me
the 10th of the OZ that it would be 4oz = .25. So if I entered 9.5Oz it would
give me what it would be in 10th?

Keith
 
R

ruralguy via AccessMonster.com

I think I would use two fields: one for the pounds and one for the ounces. I
would make the Pound field an Integer that will reject decimals and the
ounces field a currency field which can handle values to 4 decimal places.
You can always put them together whenever you want. Just my 2 cents.
 
J

John Vinson

I track bass tournaments and I would like to start keeping a record in a db.
As it is now the scale that we use is in lbs and Oz. I need to put the weight
into the db as a whole number and tenths format. So the scale would show
10lbs 8oz and I would enter 10.5 Lbs.

Can I set up a field that I could just put in the OZs and it would give me
the 10th of the OZ that it would be 4oz = .25. So if I entered 9.5Oz it would
give me what it would be in 10th?

Keith

I'm confused.

Do you want tenths of an OUNCE or do you want tenths of a POUND?

If the latter, use a Currency or Single Number datatype for the
weight, and use two textboxes on the form - one *txtWeight) bound to
the weight field for the pounds, one named txtOunces, unbound for the
ounces. In the AfterUpdate event of the Ounces textbox use code like

Private Sub txtOunces_AfterUpdate()
Me!txtWeight = NZ(Me!txtWeight) + Me!txtOunces / 16
End Sub

John W. Vinson[MVP]
 
K

KAnoe

I can see that but after 15 tournaments in one year and the adding years I'm
thinking that if I just put it in one field it would just need to add (SUM)
it all up. So if I know to put in 10.5 Lbs for 10Lbs 8 Oz.
 
R

ruralguy via AccessMonster.com

So what do you put in for 10 pounds and 1 ounce?
I can see that but after 15 tournaments in one year and the adding years I'm
thinking that if I just put it in one field it would just need to add (SUM)
it all up. So if I know to put in 10.5 Lbs for 10Lbs 8 Oz.
I think I would use two fields: one for the pounds and one for the ounces. I
would make the Pound field an Integer that will reject decimals and the
[quoted text clipped - 11 lines]
 
M

Marshall Barton

KAnoe said:
I track bass tournaments and I would like to start keeping a record in a db.
As it is now the scale that we use is in lbs and Oz. I need to put the weight
into the db as a whole number and tenths format. So the scale would show
10lbs 8oz and I would enter 10.5 Lbs.

Can I set up a field that I could just put in the OZs and it would give me
the 10th of the OZ that it would be 4oz = .25. So if I entered 9.5Oz it would
give me what it would be in 10th?


That's kind of murky. If you are entering 9.5 ounces, just
divide by 16 to get the amount in pounds.

If you are entering 9.5 to represent 9 pounds 5 ounces, then
you can calculate the total ounces using a text box
expression:
=Eval(Replace(weight, ".", "*16+"))
and divide that by 16 to get the result in pounds.
 
K

KAnoe

Works GREAT!!

Thanks

John Vinson said:
I'm confused.

Do you want tenths of an OUNCE or do you want tenths of a POUND?

If the latter, use a Currency or Single Number datatype for the
weight, and use two textboxes on the form - one *txtWeight) bound to
the weight field for the pounds, one named txtOunces, unbound for the
ounces. In the AfterUpdate event of the Ounces textbox use code like

Private Sub txtOunces_AfterUpdate()
Me!txtWeight = NZ(Me!txtWeight) + Me!txtOunces / 16
End Sub

John W. Vinson[MVP]
 
J

John Vinson

A column POUND of type CURRENCY would reasonably be expected to contain
values in Sterling (£).

Jamie.

Thanks for putting in your tuppence worth, Jamie... <g>

Good point; it's just that the Currency datatype is available and
handy for values with a few decimal places.

John W. Vinson[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