Merging Fields in an Access Database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to merge two fields in an Access database? ie: merge the first
and last name fields so the first and last name appear together.
 
Yes. Where would you like to do so? You should leave them separate in your
table.

In a query, create a new column and put something like this in it:

FullName: [FirstName] & " " & [LastName]

In a report or form, create an unbound text box and put the following in it:

=[FirstName] & " " & [LastName]
 
In a text box, set the Control Source to:
=FirstName & " " & LastName

Another way, using the same expression, is to base a query on the table in
question. In query design view, at the top of an empty column:
FullName: FirstName & " " & LastName

Use your actual field names. In the query, FullName can be whatever you
like.

Combining fields like this is called concatenation. It is a type of
calculation, so the resulting value is obtained as needed. The concatenated
value is not stored.
 
It's easy to do with a query -- just create a query using the table that
contains the fields you want to merge. Use the Simple Query Wizard if you're
new to Access. Select all the data.
Change to design view (select the triangle button from the menu). Create a
new column that merges the fields you want in one column. Type:
Name: first & " " & last
(or whatever the field names are) into the top row of any blank query column.
Change back to datasheet view. There's your merged column.
You can use this query as if it were a table.
 
Back
Top