Hi folks
Having a small problem with IIF.
I have a query that calculates a persons age using datediff, Im then required to put these into age bands. So i thought I'd use and IIF statement to check the calculated field and then for it to specify which age band it is in.
Problem is as I see it, how do I put in the OR clause into the expression?
What I was thinking was something like this:
but I also want to add the other age bands into this like
clearly my syntax is wrong cos Im getting strange results, any pointers would be greatly appreciated
Cheers
Rodmc
PS forget the fact Ive used BETWEEN I know this is not inclusive of the numbers stated
Having a small problem with IIF.
I have a query that calculates a persons age using datediff, Im then required to put these into age bands. So i thought I'd use and IIF statement to check the calculated field and then for it to specify which age band it is in.
Problem is as I see it, how do I put in the OR clause into the expression?
What I was thinking was something like this:
Code:
ageband: IIf([AGE]<25,"0-25")
but I also want to add the other age bands into this like
Code:
ageband: IIf([AGE]<25,"0-25" Or [AGE] Between 25 And 30,"25-30")
clearly my syntax is wrong cos Im getting strange results, any pointers would be greatly appreciated
Cheers
Rodmc
PS forget the fact Ive used BETWEEN I know this is not inclusive of the numbers stated