Display Weight in Lbs and Oz.

K

KAnoe

I would like to know how I can set it up in a query so that the weights that
I have in one field will be displayed in Lbs and Oz.

So if my weight is 9.21875 Lbs Can the query display the weight as 9Lbs &
3.5 Oz.

Thanks

Keith
 
D

Douglas J. Steele

Int([DecimalWeight]) & " Lbs, " & Format(([DecimalWeight] -
Int([DecimalWeight])) * 16, "00.0") & " Oz."
 
K

KAnoe

Thanks Douglas!!

Douglas J. Steele said:
Int([DecimalWeight]) & " Lbs, " & Format(([DecimalWeight] -
Int([DecimalWeight])) * 16, "00.0") & " Oz."

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


KAnoe said:
I would like to know how I can set it up in a query so that the weights
that
I have in one field will be displayed in Lbs and Oz.

So if my weight is 9.21875 Lbs Can the query display the weight as 9Lbs &
3.5 Oz.

Thanks

Keith
 
K

KAnoe

Thanks Ken!!

Ken Sheridan said:
Keith:

Something like this should do it:

SELECT SomeField, SomeOtherField,
INT([Weight]) & " lbs & " & ([Weight] - INT([Weight]))*16 & " oz"
AS PoundsAndOunces
FROM YourTable;

Ken Sheridan
Stafford, England

KAnoe said:
I would like to know how I can set it up in a query so that the weights that
I have in one field will be displayed in Lbs and Oz.

So if my weight is 9.21875 Lbs Can the query display the weight as 9Lbs &
3.5 Oz.

Thanks

Keith
 
J

John Nurick

Hi Keith,

Something like this:
Format(Int(w), "0 \l\b\ ") & Format((w - Int(w))*16, "0.00 \o\z\.")
 

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