?
Solved

Access Partition function (age segmentation)

Posted on 2008-10-11
2
Medium Priority
?
1,532 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
dannywareham earned 1600 total points
ID: 22696730
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
ID: 31505408
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

771 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