Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Unanswered: How would you Data Type this field

    how would you data type Height and Weight in an Access DB? Also, is it better to use a regular combo box or a drop down box?


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    Depends on what your base unit of measurement is, you could use and integer, or if the measurements are so big conceivably long.

    It also depends on what use you make of the data (ie are the measurements originated by you or are they orginated by an external source. EG if a supplier uses metric measurements (mm,m,km etc) then converting those into imperial (",ft,yd,mile) will require decimal values. Unless your application doesn't require the precision or you can "wing it" by citing 1" = 25mm, but it is a far from satisfactory solution.

    Generally I'd suggest you store it as a double (and accept the potential errors small decimal digits appearing). It may also be usefull to use a measurement conversion system (ie have a base measurement system) and store conversion rules that allow you to convert from an external system into your base system, althoigh if you are purely dealing with linear measurement (height width & depth) then you probably don't need this.

    You could write some functions which proivide a means of getting to and from the internal measurement system. These could provide a means of say converting an imperial values stored as, say inches, into feet and inches.

Posting Permissions

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