Update Query

  • Thread starter Thread starter Brianna W
  • Start date Start date
B

Brianna W

I have a table in which I would like to combine two fields. The fields are
LastName and FirstName. I would like to create a new field called FullName
that would have LastName (space) FirstName.

How can I trunkate the data copied from LastName and FirstName fields during
the update so that no extra spaces are included in the new FullName field?

Thanks in advance for any assisatance.
 
Hi Brianna W

I always use the following method to join two name fields.

FullName: [TableName]![FirstName] & ' ' & [TableName]![LastName]

Providing there is data within both fields you are joining this should work
fine!

Hope this helps.

Regards

Simon
 
Brianna said:
I have a table in which I would like to combine two fields. The fields are
LastName and FirstName. I would like to create a new field called FullName
that would have LastName (space) FirstName.

How can I trunkate the data copied from LastName and FirstName fields during
the update so that no extra spaces are included in the new FullName field?

Thanks in advance for any assisatance.

Brianna,

It's not a good idea to create a field "FullName" in your table since you can
always calculate it "on the fly" in a query or in code.

In a query -
FullName: Trim([LastName]) & ", " & Trim([FirstName])


Also:
If a name is misspelled, you now have two places to correct it.
It violates the 2nd normal form (I think) of normalization.
 
Back
Top