convert inches to feet, inches

A

airutah

I am trying to convert a value that is in inches to Feet & Inches. Can't seem
to find the solution that works in a form or report... Help
 
J

John Spencer

122 \ 12 & " Ft " & 122 mod 12 & "in" will return 10 Ft 2 in

If you want ' and '' then

122 \ 12 & " ' " & 122 mod 12 & "''"

As a control source
Control Name: FeetAndInches
ControlSource: =[YourField] \ 12 & " Ft " & [YourField] Mod 12 & "in"

Now that runs into problems if you have values like 122.5 inches. Because
rounding will occur before the calculations take place.

So if you have fractions of inches, I would try the following.

Int(YourField / 12) for Feet
YourField - (Int(YourField/12) * 12) for inches and fractions of inch

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
A

airutah

Thanks, did the trick

John Spencer said:
122 \ 12 & " Ft " & 122 mod 12 & "in" will return 10 Ft 2 in

If you want ' and '' then

122 \ 12 & " ' " & 122 mod 12 & "''"

As a control source
Control Name: FeetAndInches
ControlSource: =[YourField] \ 12 & " Ft " & [YourField] Mod 12 & "in"

Now that runs into problems if you have values like 122.5 inches. Because
rounding will occur before the calculations take place.

So if you have fractions of inches, I would try the following.

Int(YourField / 12) for Feet
YourField - (Int(YourField/12) * 12) for inches and fractions of inch

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

airutah said:
I am trying to convert a value that is in inches to Feet & Inches. Can't
seem
to find the solution that works in a form or report... Help
 

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