Results 1 to 2 of 2
Thread: IIF statement (2000)
2005-01-06, 12:39 #1
- Join Date
- Jan 2001
- Thanked 0 Times in 0 Posts
IIF statement (2000)
I have a query that has a field called Counties.
I have to break this field down according to Region.
I would like to create a Region column in the query.
There are about 5 regions - "Special Accounts", "2-19 Book", "North Central Region", "Lehigh Valley Region", "South Central Region"
I want to use the IIF statement but I am not sure.
It would be something like - IIF county in (Berk, Allegheny, etc), "Special Accounts", ? then I have to define the other counties according to what region they are in.
I am not sure this is the best approach. Is this a nested IIF and if so how do I set it up. Thanks for any help you can provide.
2005-01-06, 12:48 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: IIF statement (2000)
Do you already have a table that lists the (unique) counties? If so, add a Region field to this table. If not, create a table with two fields: County and Region.
<td align=center>County</td><td align=center>Region</td> <td>Berk</td><td>Special Accounts</td> <td>Alleghany</td><td>Special Accounts</td> <td>...</td><td>...</td></table>
You can add this table to your query, linked to the table that is already there on County, and drag the Region field to the query design grid.