Merging columns (1 Viewer)

Ben McCall

Registered User.
Local time
Today, 21:19
Joined
Jun 20, 2001
Messages
22
Is there any way to merge the contents of three columns in to one column.
Title First Name Last Name
Mr. & Mrs. Ben McCall

to give:

Name
Mr. & Mrs. Ben McCall

Ben McCall
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:19
Joined
Feb 28, 2001
Messages
27,279
I am going to assume this is for a form or report.

The [Full Name] control on this object should be unbound. The [Title], [First Name], and [Last Name] controls should be bound to your recordset.

In VBA, probably in the Form_Current event code, add

[Full Name] = [Title] & [First Name] & [Last Name]

optionally, if your data quality is uncertain, instead use

[Full Name] = Trim$( Trim$(NZ([Title],"")) & " " & Trim$(NZ([First Name],"")) & " " & Trim$(NZ([Last Name],"")))

The latter is when you really don't trust ANYTHING in your database. Since you describe your problem in a vacuum, you don't indicate the data quality so I can't make assumptions about that.
 

Ben McCall

Registered User.
Local time
Today, 21:19
Joined
Jun 20, 2001
Messages
22
I am not interested in a form or a report. All I want to do is merge three fields into one field in the table and then delete the three original fields.

Thanks!

Ben McCall
 

Ben McCall

Registered User.
Local time
Today, 21:19
Joined
Jun 20, 2001
Messages
22
I understand the importance of separate fields but I have a specific need to combine several fields to meet the requirements of a merge fax program. I can combine fields in a copy and keep the original "pure".

Thanks!

Ben McCall
 
R

Rich

Guest
You don't need to store the values or create another table for them just use a query to return them.
HTH
 

Users who are viewing this thread

Top Bottom