Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2007
    Posts
    5

    Unanswered: Access 2002 range in a form

    Is it possible to calculate the range of three cells from data entered in a form within the same record? Would I use the MAX/MIN or Dmax/Dmin functions to calculate the range?

  2. #2
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    range is usually between two points, no? What data type are the three values?
    Ryan
    My Blog

  3. #3
    Join Date
    Aug 2007
    Posts
    5

    Range

    I am looking for the range of the three values using a max and min function

  4. #4
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    sorry I am still waking up. If you are needing the range for three, you would need to write some function that looks at each value and then just subtracts the greatest and least values. Max()would give you just the max value in some field.
    Ryan
    My Blog

  5. #5
    Join Date
    Aug 2007
    Posts
    5

    I agree

    I agree with what you are saying, but how do I create the formula to make this happen?

  6. #6
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    I just found an easier way, maybe. In your fourth textbox set the control source to:
    Choose(Max(),[txtbox1],[txtbox2],[txtbox3])-Choose(Min(),[txtbox1],[txtbox2],[txtbox3])
    Ryan
    My Blog

  7. #7
    Join Date
    Aug 2007
    Posts
    5
    I tried
    =Choose(Max(),[Coating Thickness A 1],[Coating Thickness A 2],[Coating Thickness A 3]))-Choose(Min(),[Coating Thickness A 1],[Coating Thickness A 2],[Coating Thickness A 3])

    And still can not seem to get it to work. Am I just being blinded by the numbers?

    Thanks for your help

  8. #8
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    The stuff in the brackets should be the names of the actual text boxes, not your field names.
    Ryan
    My Blog

  9. #9
    Join Date
    Aug 2007
    Posts
    5
    I had changed the text box names to match the field names due to the complexity of the DB.
    Last edited by ahoop; 08-22-07 at 16:52.

  10. #10
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    I would name them like txtboxCoatT1,...2,...3
    Ryan
    My Blog

Posting Permissions

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