I have a database that records details of guests. I have three age categories (each charged at different rates) and I have a field on the form for the total of each age group in that booking (see attached):
Age Group Field
0-12 Years Qty 0-12
13-17 Years Qty 13-17
18 Years and over Qty Adults
I'm struggling to come up with an expression that will (based upon the ages entered in "Age 1", "Age 2" etc.) total the number of each age group in "Qty 0-12", "Qty 13-17" and "Qty Adults".
I've tried the following but it doesn't work:
=IIf([Age 1] >=18,1,IIf([Age 2] >=18,+1,IIf([Age 3] >=18,+1,IIf([Age 4] >=18,+1,IIf([Age 5] >=18,+1,IIf([Age 6] >=18,+1, 0))))))
Can anyone help please ?