Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Salutation Field needs to be combined 1

Status
Not open for further replies.

vise

Technical User
Jul 31, 2003
143
US
Hi All,
I created a table:

ID AccID Title First Last
1 1 Mr. Larry Chrom
2 1 Mrs. Joan Chrom

Is it possible to generate a salutation in the form of:
"Mr. and Mrs. Chrom" when quering AccID=1?

Thanks for your help.

Sin
 
There are sveral post and more than one FAQ on concatenating. For example:
How to concatenate multiple child records into a single value
faq701-4233

However, you may have an additional problem. Will an AccID of x always have a maximum of two people and will they be Mr and Mrs? Or will you have Mr & Mr or Mr & Dr and so on. Will AccID x have three people sometimes?
 
Thanks for your response. I didn't think to look in the FAQ I was just searching the forums. For all intensive purposes it works for 95% of the accounts as to the accID thus, I can fix the rest when it is visually inspected (I'm doing a letter generation from access). If you know of a better way of doing this, without any errors please share :)

Thank you for your help.
 
I cannot think of a way to do this without errors - there are so many possible salutations. I suppose you could check that the second (last) names are the same and concatenate on the Mr & Mrs (Sr & Sra) if they are the same, and go for Mr Full Name & Dr Full Name, if they are not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top