Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / September 2005

Tip: Looking for answers? Try searching our database.

Update Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brianna W - 19 Sep 2005 16:31 GMT
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.
SusanV - 19 Sep 2005 16:45 GMT
Hi Brianna,

You can use the Trim function to get rid of all leading and trailing spaces,
then concatenate LastNaem & " " & FirstName.

Info on Trim function:
http://www.techonthenet.com/access/functions/string/trim.php
Signature

hth,
SusanV

>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
[quoted text clipped - 5 lines]
>
> Thanks in advance for any assisatance.
chilvs - 19 Sep 2005 16:55 GMT
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

> 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
[quoted text clipped - 4 lines]
>
> Thanks in advance for any assisatance.
SteveS - 19 Sep 2005 22:13 GMT
> 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
[quoted text clipped - 4 lines]
>
> 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.

Signature

Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came, I saw, I stuck around.)

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.