setting a number format as length

B

beejsnyder

I'm improving on an existing database (previously in Excel) and moving it to Access. Many of the columns are referencing numbers which are in feet and inches. I'm sure there's a number format which will support such a type of data but have been completely unable to find it or figure it out. any help available out there would be GREATLY appreciated!!
 
R

Rick B

How did you do this in Excel?

Rick B


I'm improving on an existing database (previously in Excel) and moving it to
Access. Many of the columns are referencing numbers which are in feet and
inches. I'm sure there's a number format which will support such a type of
data but have been completely unable to find it or figure it out. any help
available out there would be GREATLY appreciated!!
 
J

John Nurick

IMO there are three ways to go. Which is best depends on what needs to
be done with the lengths.

1) convert the length into decimal feet or decimal inches and store it
in a Double.

2) store the length in two or three fields, Feet, Inches, [64ths]. If
Feet is a Number (Integer), the other two can be Number (Byte) and the
three fields only occupy four bytes.

3) store it as a string, e.g.
7' 6" 11/16

For entering feet and inches easily, you'll find you can do without the
" and /. Strings like this can be parsed:
7' 0 58 (7 feet and 5/8 inch)
18'3 (18' 3")
6 2364 (6 and 23/64 inches)
 
T

Tim Ferguson

For entering feet and inches easily, you'll find you can do without the
" and /. Strings like this can be parsed:
7' 0 58 (7 feet and 5/8 inch)
18'3 (18' 3")
6 2364 (6 and 23/64 inches)

<advocacy client="devil">
How do you know the last fraction isn't 2/364?


<g>


Tim F
 
J

John Nurick

<advocacy client="devil">
How do you know the last fraction isn't 2/364?

I used this technique when writing conversion software for the HP41C way
back when, and AFAIR it's unambiguous for all the standard fractions of
an inch (half, quarters, eighths ... sixty-fourths). Anyone who uses
128ths or smaller deserves to be gelded with a red-hot micrometer. As
for 364ths: forcible metrication is the only fitting penalty!
 

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