Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access Partition function (age segmentation)

Posted on 2008-10-11
2
Medium Priority
?
1,552 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
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.

604 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