A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Merging two field together



 
 
Thread Tools Display Modes
  #1  
Old February 15th, 2007, 08:33 PM posted to microsoft.public.access.queries
ChuckW
external usenet poster
 
Posts: 182
Default Merging two field together

Hi,
I am trying to create a field called UserID. It will be based on two other
fields: FirstName and LastName. What I want to do is to get the first letter
of the first name and then combine it with the last name. So if I have John
in my FirstName field and Smith in my last name field I am looking for a way
to create the UserID field with the value JSmith. Can anyone help?

Thanks,


--
Chuck W
  #2  
Old February 15th, 2007, 09:32 PM posted to microsoft.public.access.queries
Rick B
external usenet poster
 
Posts: 749
Default Merging two field together

In your reports and forms, just create an unbound field with the following:

=Left([FirstName],1) & [LastName]

In your queries, create a new column and put the folowing:

UserID: Left([FirstName],1) & [LastName]



You would not store this in your table, as it is redundant.



What if you have two "J Smith"s? How will you create the UserID? Since you
would have two different ones, you might at this point store it in your
table and just use the instructions above to create the default one.


--
Rick B



"ChuckW" wrote in message
...
Hi,
I am trying to create a field called UserID. It will be based on two
other
fields: FirstName and LastName. What I want to do is to get the first
letter
of the first name and then combine it with the last name. So if I have
John
in my FirstName field and Smith in my last name field I am looking for a
way
to create the UserID field with the value JSmith. Can anyone help?

Thanks,


--
Chuck W



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.