Combined Address

10 pts.
Tags:
Microsoft Access
Query
SQL
I have one tblContacts that has "Home" and "Work" address included within it, I also have an option button 1="Work" and 2="Home". I need to prepare a mailling report, but only for the defaut address. Someone suggested that I create a calculated field. I tried this but all that it is doing is pulling the HomeAddress into the column, and I need both combined. His suggestion was Base the report on a Query with a calculated field: UseAddress: IIF([Forms]![YourForm]![YourOptionGroup] = 1, [Workaddress], [Homeaddress]) If - as you should! - the address consists of multiple fields (Address1, Address2, City, State, Postcode) then you'll need to repeat this logic for each field. I did not quite understand him, I set up my calculated field like this: Below is what I put in the query. He said to repeat this, does he mean I need to write in the same calculated field the “IIF([Forms]![frmContacts]![DefaultAddress] = 1, [WorkCity] and all this in the same calculated field “MainAddress” query’s? This is what I put in the query below. This is the calculated field-“MainAddress”: “IIF([Forms]![frmContacts]![DefaultAddress] = 1, [WorkAddress], [HomeAddress] The fields that I am addressing, which are in the same table are: WorkAddress, WorkCity, WorkStateOrProvince, WorkPostalCode and HomeAddress, HomeCity, HomeStateOrProvince, HomePostalCode Thank you! Terra

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following