If/Then Statement???

  • Thread starter Thread starter Amanda
  • Start date Start date
A

Amanda

I have a massive database that contains contact
information. We have a field for company name - but the
address can be either home or business. I created a
field for address type, with drop down choices. I want
the business name to NOT print on mailing labels when the
Home address has been selected. Any ideas on the easiest
way to do this??
 
I have a massive database that contains contact
information. We have a field for company name - but the
address can be either home or business. I created a
field for address type, with drop down choices. I want
the business name to NOT print on mailing labels when the
Home address has been selected. Any ideas on the easiest
way to do this??

Is the [AddressSelection] field a Yes/No check Box?
Let's assume so.

Include the [AddressSelection] field in the Report Record Source.
Then, as the address field, use an unbound control.
Set it's Control Source to:
=IIf([AddressSelection] = -1,[HomeAddress],[BusinessAddress])

If the [AddressSelecton] field is not a Check box, but rather Text
datatype, then:
=IIf([AddressSelection] = "Home",[HomeAddress],[BusinessAddress])
 
The address type is a drop down with several choices -
"Business" "Home" and "Summer" - idealy, I would want
the Company Name to not appear on mailings going to the
Summer or Home addresses.
Thanks for the quick reply - you rock!
-----Original Message-----
I have a massive database that contains contact
information. We have a field for company name - but the
address can be either home or business. I created a
field for address type, with drop down choices. I want
the business name to NOT print on mailing labels when the
Home address has been selected. Any ideas on the easiest
way to do this??

Is the [AddressSelection] field a Yes/No check Box?
Let's assume so.

Include the [AddressSelection] field in the Report Record Source.
Then, as the address field, use an unbound control.
Set it's Control Source to:
=IIf([AddressSelection] = -1,[HomeAddress], [BusinessAddress])

If the [AddressSelecton] field is not a Check box, but rather Text
datatype, then:
=IIf([AddressSelection] = "Home",[HomeAddress], [BusinessAddress])
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
I ADORE YOU!!!!!!!!!!!!!!!!!!!!!!!!!!! Thank you sooooo
much!!!!!!!!!!111
-----Original Message-----
I have a massive database that contains contact
information. We have a field for company name - but the
address can be either home or business. I created a
field for address type, with drop down choices. I want
the business name to NOT print on mailing labels when the
Home address has been selected. Any ideas on the easiest
way to do this??

Is the [AddressSelection] field a Yes/No check Box?
Let's assume so.

Include the [AddressSelection] field in the Report Record Source.
Then, as the address field, use an unbound control.
Set it's Control Source to:
=IIf([AddressSelection] = -1,[HomeAddress], [BusinessAddress])

If the [AddressSelecton] field is not a Check box, but rather Text
datatype, then:
=IIf([AddressSelection] = "Home",[HomeAddress], [BusinessAddress])
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top