Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Calculated Fields in QBE "...wrong number of arguments" Message

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GYMShoes - 24 Nov 2005 09:21 GMT
This should be easy.... but now, it is just getting frustrating
In a calculated field I want to use the expression "Max" to find largest
number of a series of numbers. In QBE, on the FIELD row I've written:

MaxOfMax:  Max(85;45;26;95;35;15;75)

as soon as I try to leave the FIELD line of the query or execute the query,
I get the error "The expression you entered has a function containing the
wrong number of arguments"

Normally, I want to use result from a number of different querys, and
evaluate them to find the MAX, but until I can get the above expresion
working, there nopoint.

If I use commas(,) instead of semicolans(;) i get sytax errors, and I'm
pointed to the commas.
The same, or more or less the same expression (=Max(85;45;26;95;35;1;75), in
a cell of Excel returns the correct answer: 95

what is wrong with me or access - can you just not use this function this
way??
If I use:

MaxOfMax:  Max(45)

then the query runs and it returns 45
Allen Browne - 24 Nov 2005 09:56 GMT
The Max() within the query is for choose the maximum value found in a
column. You cannot use it to select the maximum value from a list.

Try MaxOfList() from this link:
   http://allenbrowne.com/func-09.html

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> This should be easy.... but now, it is just getting frustrating
> In a calculated field I want to use the expression "Max" to find largest
[quoted text clipped - 24 lines]
>
> then the query runs and it returns 45
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.