Solved

Access Partition function (age segmentation)

Posted on 2008-10-11
2
1,414 Views
Last Modified: 2010-04-21
Hello,
I have a query that has an age field [qeAge]. I would like to categorise the age of each person in the database into demographic segments. These demographic segments would be displayed in one separate field and identified by a further number (see below)

(Age) = (identifier)
0-14 = 1
15-24 = 2
25-34 =3
35-44 = 4
45-54 = 5
55-64 = 6
64-75 = 7
75+ = 8
Ive tried to get my head around the partition function Microsoft discusses here:
http://office.microsoft.com/en-us/access/HA012288921033.aspx?pid=CH100728911033
However I havent been able to get my head around it. I tried using the field: Demographic: [partition(qeAge,0,125,15)]
But that didnt return anything. Could you please help.
0
Comment
Question by:Dozingquinn
2 Comments
 
LVL 26

Accepted Solution

by:
dannywareham earned 400 total points
Comment Utility
There is a Partition function in Access that will do this for you - the syntax is

Partition(number, start, stop, interval)

e.g.
Select Partition([DaysLate], 0, 9999,30) as DateRange

You've almost got it right.
There's also more info here (a great description)
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20006150.html
0
 

Author Closing Comment

by:Dozingquinn
Comment Utility
Thanks
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now