Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2006
    Posts
    559

    Unanswered: Height and Weight

    How can you automatically have a text field in a table display a persons height in XXft XXin and weight in XXXlbs?

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I'd use numeric fields rather than text, presuming you might want to sort on them at some point. You could have 2 fields, one for feet and one for inches, but I'd probably show it to the user that way but actually have one field and just store inches. For display, you simply have the feet textbox followed by a label that says "ft".
    Paul

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You can also apply a format mask to the values you get back from your table.

    If you stored "5" in the database as a number, you could apply a "00ft" mask to have it read 5ft.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Just for clarity, don't confuse "format mask" with Input Mask though. Teddy is referring to the Format property.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    displaying the weight is easy enough
    however feet & inches can be a problem.. the metric world is so much easier, still I suppose the imperial system must have some advantages, otherthan backwards looking countires sticking to the we've done it thsi way for the last 800 years so it must be right

    the problem to my mind is how you store the data as opposed to how you display the data. you could accept the data entry as say 6'2" and store it that way.. you loose all method of comparisons, unless you foramt as 6'01", as opposed to 6'1", you would be unable to resolve that 6'2" is smaller than 6'10"

    you could allow data entry as xx'yy" but store as either decimal feet, or integer inches or even go metric..

    when it cones to reporting/displaying you could use a custom function to translate back from what ever you stored the data in into recognisable units
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yes, that is a completely relevant Access question! lol

    Try www.weightwatchers.com.au or maybe even google for "healthy weight range"?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Actually, dvdrumis, your post is spam, and will be reported as such.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I'd store the height in the table as inches and use an unbound control to give the ft/in display. If the field is named Inches, in the Control Source for the unbound textbox you could use something like this:

    Code:
    =[Inches]\12 & " ft  " & [Inches] Mod 12 & " in"
    63 inches will give you a display of

    5 ft 3 in.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •