S
Stephanie
Hi. I have a query that I need to modify and I can't get the syntax correct.
I have members that have 1 or 2 mailing addresses. To determine which
address to use, I have AddressFlag which equals 1 or 2. The query I have is
working correctly, but now I need to add Country into the mix. If Country =
United States, I want my address labels unchanged (meaning, don't display the
country). If Country <> United States, I want the Country to print on the
address label.
This is what I'm working with:
Country: IIf([AddressFlag]=1,c1.Country1,c1.Country2)
Issues:
1) Country is displayed as 1, 2... 1= United States. I have a combo box on
the Country field: SELECT [Country].[CountryID], [Country].[Country] FROM
[Country]
but I want this filed displayed as the actual country (if the country <>
United States) rather than a number.
In my Contacts table where I keep address data, Country1 and Country2 are
text fields. In my Country table I have Country as a text field and use this
as the basis for choosing Country1 and Country2.
2) Do I need to use perhaps Nz along with my IIF statement to not show
Country1 and Country2 if they are United States, or if I have issue 1 fixed
can I just use <>United States in my query?
Thanks for your time!
I have members that have 1 or 2 mailing addresses. To determine which
address to use, I have AddressFlag which equals 1 or 2. The query I have is
working correctly, but now I need to add Country into the mix. If Country =
United States, I want my address labels unchanged (meaning, don't display the
country). If Country <> United States, I want the Country to print on the
address label.
This is what I'm working with:
Country: IIf([AddressFlag]=1,c1.Country1,c1.Country2)
Issues:
1) Country is displayed as 1, 2... 1= United States. I have a combo box on
the Country field: SELECT [Country].[CountryID], [Country].[Country] FROM
[Country]
but I want this filed displayed as the actual country (if the country <>
United States) rather than a number.
In my Contacts table where I keep address data, Country1 and Country2 are
text fields. In my Country table I have Country as a text field and use this
as the basis for choosing Country1 and Country2.
2) Do I need to use perhaps Nz along with my IIF statement to not show
Country1 and Country2 if they are United States, or if I have issue 1 fixed
can I just use <>United States in my query?
Thanks for your time!