Hello
I need help with a formula in access please.
I have 12 codes that need to have either the letter A, B or C added to the end of the code depending on the age of a person:
e.g.
codes
AB01
AB02
AB20
AB21
If the persons age is 19 years and over I need an A at the end e.g. AB01A
If the persons age is between 6 and 18 years and over I need a B at the end e.g. AB01B
If the persons age is 5 and under I need a C at the end e.g. AB01C
I have the age calculated its just grouping to the correct code I need help with??
I have had ago:
CODE: IIf(
I need help with a formula in access please.
I have 12 codes that need to have either the letter A, B or C added to the end of the code depending on the age of a person:
e.g.
codes
AB01
AB02
AB20
AB21
If the persons age is 19 years and over I need an A at the end e.g. AB01A
If the persons age is between 6 and 18 years and over I need a B at the end e.g. AB01B
If the persons age is 5 and under I need a C at the end e.g. AB01C
I have the age calculated its just grouping to the correct code I need help with??
I have had ago:
CODE: IIf(
Code:
In ("RD01","RD02","RD20","RD21","RN04","RN08","RN16","RN23","RN25","RN29","RN30","RN34"),IIf([Age]<6,[Code&"C"],IIf([Code] In ("RD01","RD02","RD20","RD21","RN04","RN08","RN16","RN23","RN25","RN29","RN30","RN34"),IIf([Age]<19,[Code&"B"],IIf([Code] In ("RD01","RD02","RD20","RD21","RN04","RN08","RN16","RN23","RN25","RN29","RN30","RN34"),IIf([Age]>=19,[Code&"A"]))))))
Any help appreciated
Katherine