merging fields

  • Thread starter Thread starter Christopher Blinn
  • Start date Start date
C

Christopher Blinn

Is it possible to merge two text fields into a single
field. I have firstname and lastname fields. Can I
create a fullname field without re-entering the data?
 
Sure.

1. Add the FullName field to your table.

2. Create an Update Query for this table, as follows:

- In the Field: row of the query's design grid, insert the FullName field
- In the Update to: row of that same column, insert the following:

[FirstName] & " " & [LastName]

I should say, however, that adding this field to your table and populating
it with redundant data is not recommended, primarily because the FullName
field can (and will) become incorrect very easily. For example, say the
LastName field for one of the records in your table is changed (marriage,
divorce, etc.). Unless you have code written to update the FullName field
whenever the LastName (or FirstName) field changes, the data integrity of
your table is shot.

You can, and should, use the above expression ( [FirstName] & " " &
[LastName] ) in reports and queries whenever you want to show a full name.


hth,
 
Back
Top