p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   MIN() function (http://p2p.wrox.com/showthread.php?t=20581)

mohiddin52 October 29th, 2004 06:54 AM

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

JLovell October 29th, 2004 07:09 AM


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"

All times are GMT -4. The time now is 01:10 AM.

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