Solved

Access Partition function (age segmentation)

Posted on 2008-10-11
2
1,489 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
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

733 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