Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006
    Posts
    19

    Unanswered: min function help

    Hello. I have 3 columns of dollar amounts in a table and I want to pick the smallest dollar amount and enter it into a new column. Can I use the eqivalent of the excel "min" function in acess?

    Thanks.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No:

    http://support.microsoft.com/default...b;en-us;209857

    and the desire/need to do it hints at a design that isn't properly normalized.

    I wouldn't store the value, as it can always be calculated from the 3.
    Paul

  3. #3
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,475
    Provided Answers: 11
    Here a Function I Use

    Code:
    Function My_Min(val1, val2)
    
    If val1 <= val2 Then
    My_Min = val1
    Else
    My_Min = val2
    End If
    End Function

    then in a query

    I have this

    My_Min: My_min([feild1],My_min([feild2],[Feild3]))
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

  4. #4
    Join Date
    Feb 2006
    Posts
    19
    Thanks much, it worked!!

Posting Permissions

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