How do I stop range duplications

Joined
Jun 12, 2008
Messages
7
Reaction score
0
I am trying to write a query( design view),

I need to count how times someone is in a certain mileage range each year,

the problem is because the range is large 30K, once the car/person reaches that range they continue to appear . How can I restart the counter for the next 30K, so they only appear once per 30K

Here are the first colums of my query

OHYR1/1: IIf([fh1] Between [yr1engoh] And [yr2engoh],1,0)*[TotalACCperaircraft]

OHYR1/2: IIf([fh1] Between [yr2engoh] And [yr3engoh],1,0)*[TotalACCperaircraft]

OHYR1/3: IIf([fh1] Between [yr3engoh] And [yr4engoh],1,0)*[TotalACCperaircraft]

OHYR1/4: IIf([fh1] Between [yr4engoh] And ([yr4engoh]+[yr1engoh]),1,0)*[TotalACCperaircraft]


and here is the last

OHYR10/4: IIf([fh10] Between [yr4engoh] And ([yr4engoh]+[yr1engoh]),1,0)*[TotalACCperaircraft]

I hope this is enough so someone can help

thanks in advance

Andy
 
Back
Top