AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Monday, April 30, 2012

Partition function in Access

Once I found that Access has Partition function, which I never used. Function returns a Variant (String) indicating where a number occurs within a calculated series of ranges. You can use is to find lower and upper edge of partition where number falls. Few samples:

?Partition(33,1,100,5)
31: 35

?Partition(7,1,100,5)
6: 10

?Partition(999,1,100,5)
101:

Now I am thinking – how can I use it? Looks like I never missed such function. Do you have real-life example using Partition function?

Labels:

2 Comments:

Blogger Warsmoke said...

Here's one possible use: Access Blog - Create partition queries

12:41 PM  
Blogger Paul Harrold said...

I used partition() to ascertain how many people fell within certain age ranges within a system. The results were something like:

Age range - count
0:20 - 25
21:64 - 32
65: - 46

I proved to be a very useful function at the time - as a result I kept looking for ways to use it in a few subsequent systems.

Paul Harrold Access developer

8:45 PM  

Post a Comment

Links to this post:

Create a Link

<< Home