🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.databases.ms-access
5 messages
5 total messages Started by haa01 Mon, 05 Jan 1998 00:00
finding a certain number in a column (for example the 2nd largest)
#411
Author: haa01
Date: Mon, 05 Jan 1998 00:00
16 lines
1659 bytes
Hi 

My name's Eli and I have a little problem

I'd like to get a certain number out of a column. For example the 4th
largest number.
In excel this can be done by using the function LARGE, but in access I
haven't yet fount a corresponding function.

Does anyone know of such a function in access ?
If not, is it hard to program in vba ?

Thanks in advance

Eli
Re: finding a certain number in a column (for example the 2nd largest)
#412
Author: Gary Labowitz
Date: Mon, 05 Jan 1998 00:00
28 lines
1999 bytes
Run a top values query for the number you want and take the first/last
record returned (depending on how you sorted them).
HTH
-- 
Gary (MCT, MCPS, MCSD)
www.enter.net/~garyl/  for references to good books.
Contribute to garyl@enter.net

haa01 <haa01@interpac.be> wrote in article
<01bd19ec$53f23380$a3434ec2@PC2.interpac.be>...
> Hi 
> 
> My name's Eli and I have a little problem
> 
> I'd like to get a certain number out of a column. For example the 4th
> largest number.
> In excel this can be done by using the function LARGE, but in access I
> haven't yet fount a corresponding function.
> 
> Does anyone know of such a function in access ?
> If not, is it hard to program in vba ?
> 
> Thanks in advance
> 
> Eli
> 
> 
Re: finding a certain number in a column (for example the 2nd largest)
#413
Author: Joe A. Hissen
Date: Mon, 05 Jan 1998 00:00
33 lines
1964 bytes
Hi Eli

The following SQL statement might work for you. 
NOTE:
Choose the topmost value, using the Descending sort.

SELECT TOP 4 Table1.Column1
FROM Table1
ORDER BY Table1.Column1 DESC;

Regards
Joe A. Hissen

haa01 <haa01@interpac.be> wrote in article
<01bd19ec$53f23380$a3434ec2@PC2.interpac.be>...
> Hi 
> 
> My name's Eli and I have a little problem
> 
> I'd like to get a certain number out of a column. For example the 4th
> largest number.
> In excel this can be done by using the function LARGE, but in access I
> haven't yet fount a corresponding function.
> 
> Does anyone know of such a function in access ?
> If not, is it hard to program in vba ?
> 
> Thanks in advance
> 
> Eli
> 
> 
Re: finding a certain number in a column (for example the 2nd largest)
#414
Author: lbo
Date: Wed, 07 Jan 1998 00:00
18 lines
1712 bytes
>I'd like to get a certain number out of a column. For example the 4th

...

>If not, is it hard to program in vba ?

you could write it in vba but the easiest thing is to build a query
and then ask for the n top- or bottom-values.  you do this by
twiddling with the property window of the query.


lbo@nospam.iol.it
    ^^^^^^^
-- per rispondere eliminate la stringa "nospam." dall'address
-- to answer remove "nospam." from the email address

http://users.iol.it/lbo
Re: finding a certain number in a column (for example the 2nd largest)
#415
Author: lbo
Date: Wed, 07 Jan 1998 00:00
18 lines
1712 bytes
>I'd like to get a certain number out of a column. For example the 4th

...

>If not, is it hard to program in vba ?

you could write it in vba but the easiest thing is to build a query
and then ask for the n top- or bottom-values.  you do this by
twiddling with the property window of the query.


lbo@nospam.iol.it
    ^^^^^^^
-- per rispondere eliminate la stringa "nospam." dall'address
-- to answer remove "nospam." from the email address

http://users.iol.it/lbo
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads