Question : Access Partition function (age segmentation)

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.

Answer : Access Partition function (age segmentation)

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
Random Solutions  
 
programming4us programming4us