Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 29th, 2004, 06:54 AM
Authorized User
 
Join Date: Dec 2003
Location: Vashi, Navi Mumbai, Maharashtra, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default MIN() function

Hi all members,
In access how should write the MIN() function
In my table hra=5000,cca=6500,total=11500
now i want minimum of above table
in excel MIN(hra,cca,total)
Answer is hra
so please how should write the function of MIN() in access



Mohamed Mohiddin
Officer
__________________
Mohamed Mohiddin
Officer
  #2 (permalink)  
Old October 29th, 2004, 07:09 AM
Authorized User
 
Join Date: Oct 2004
Location: Austin, TX, USA.
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mohamed-

Access is not Excel. You can find the Min value across multiple rows, but not multiple columns - at least not using Min. To do it in Access, you have to write an ugly expression using IIf:

IIF([hra]<[cca], IIF([hra]<[total], [hra], [total]), IIF([cca]<[total], [cca], [total]))

John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one get the Max or Min Filename? crabjoe ASP.NET 1.0 and 1.1 Basics 4 January 15th, 2008 04:48 PM
MAX/MIN Value Help slbibs SQL Server 2005 4 November 6th, 2007 04:00 AM
Min Function deontae45 SQL Server 2000 13 September 23rd, 2006 05:45 AM
Min / Max followup danbush XSLT 2 August 31st, 2005 12:02 PM
min-height in IE cgallagr98 CSS Cascading Style Sheets 5 April 8th, 2005 12:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.