Joins fields in a query

Vaimpir

JAFO
Local time
Today, 13:41
Joined
Mar 5, 2004
Messages
78
I have a query that searches for a client of a specific employee. The information i am extracting in the query is the clients first name,last name,spouse first name, spouse last name, mailing address, city, state, and postal code. I want to join the first names into one field so when i export the query to a mai merge I dont have to manually jion them later. Can this be done?

Thanks


Steven
 
Sure. At its simplest:

JointName: ClientFirstName & " and " & SpouseFirstName
 
I would use an IIf function to ensure that if there are missing first names, they don't get printed. For instance, you wouldn't send an invitiation to "John and Jones" if his wife Velma were not included.
 
I agree (that's why I said "at its simplest"), though I use something like this, as it's always seemed more efficient to me:

JointName: ClientFirstName & (" and " + SpouseFirstName)
 
Presuming you're using the QBE (as opposed to SQL view), just paste the example into a new field (column) and change the 2 field names to match yours.
 
In an empty column place the code in the field row.


JointName: [ClientFirstName] & " and " & [SpouseFirstName]
 
How can I set it if there is no spouse that the "and" does not appear in the field?
 
Read ALL the posts on your thread.
 

Users who are viewing this thread

Back
Top Bottom