From: FCFD010 on
I want to list the height of individuals in a field and be able to use the
value as a number for averaging it. For example, if an individual is listed
as 6' 5", how can I put that into a field, and have it in a format which can
be queried so that I can average the height of all the folks in the database?
From: Tom van Stiphout on
On Sat, 3 Apr 2010 11:15:01 -0700, FCFD010
<FCFD010(a)discussions.microsoft.com> wrote:

Welcome to the Imperial system :-)
I think we need to differentiate between how a value is stored, and
how it is displayed. For example you can store the number of inches in
an integer field, and then format this value as feet and inches using
the Format function.

-Tom.
Microsoft Access MVP


>I want to list the height of individuals in a field and be able to use the
>value as a number for averaging it. For example, if an individual is listed
>as 6' 5", how can I put that into a field, and have it in a format which can
>be queried so that I can average the height of all the folks in the database?
From: John W. Vinson on
On Sat, 3 Apr 2010 11:15:01 -0700, FCFD010 <FCFD010(a)discussions.microsoft.com>
wrote:

>I want to list the height of individuals in a field and be able to use the
>value as a number for averaging it. For example, if an individual is listed
>as 6' 5", how can I put that into a field, and have it in a format which can
>be queried so that I can average the height of all the folks in the database?

I'd suggest storing the value as a Number... Double count of inches - e.g. 6'
5" would be stored as 77.0, 5' 2.5" as 62.5.

You can have code on a form to either use two unbound textboxes for feet and
inches, or to parse a text string such as 6' 5" (though the use of both ' and
" in the string will make the code a bit more complex).

Of course... you could go metric! 195.6 cm works.

--

John W. Vinson [MVP]