473,396 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MS Access Table Query showing Customer Name as a code.

HI,
I would like to show the 1st 5 characters of Customers First and Last Name combined into one field.
Eg John Snow = SnowJ
Thanks in advance.
Jun 19 '15 #1

✓ answered by Seth Schrock

You would use the Left() function on the combined texts.
Expand|Select|Wrap|Line Numbers
  1. Left(LastName & FirstName, 5) As CustomerCode

3 1608
Seth Schrock
2,965 Expert 2GB
You would use the Left() function on the combined texts.
Expand|Select|Wrap|Line Numbers
  1. Left(LastName & FirstName, 5) As CustomerCode
Jun 19 '15 #2
Hey Seth,
Thank you for the response.
Something so simple hahhaha.
Regards
Jun 19 '15 #3
zmbd
5,501 Expert Mod 4TB
Something to consider...
My last name has more than five characters....
So if you take my first name (Zmbd) and then my last name (Babcdefgh) use the above left function you get Babcd not a BabcdZ or BabcZ etc...

Is this truly what you want?

Expand|Select|Wrap|Line Numbers
  1. Left([Lastname],4) & Left([FirstName,1) As CustomerCode
Would return the BabcZ

Have you considered how to handle the case of the shorter last/sur-names as one might find for someone born in Korea, Japan, China, etc?
Jun 24 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Owen Jenkins | last post by:
Hi, My application allows users to create a new back end for separate purposes. It does this by using Make Table Queries and Indexing via SQL. For example ... sqlString = "SELECT * INTO " &...
4
by: Owen Jenkins | last post by:
Hi, No-one replied to this when I sent it last week. Any bites out there today?? ----- My application allows users to create a new back end for separate purposes. It does this by using Make...
2
by: jalmar | last post by:
Hello....I'm back again with the same question. I still haven't been able to figure out why my query isn't working. I am linking a table to an Excel spreadsheet, that part is fine, it is even...
2
by: John Overton | last post by:
I have a need to copy an ACCESS Table and save it as a different named table but with the same table format with VBA. I am using VBA in ACCESS 2003. Thanks much for any suggestions. ...
5
by: Lefke123 | last post by:
hello, does anyone know how to write certain information from a table / query using VB into a new excel sheet for example; i press a button and a printable excel file is made with the name...
10
by: Ben Cherry | last post by:
Hi I have created a tablein acess 07 with three fields; admno, name, and Mark/100. My problem is that i need to have a field with position of this students based on the marks i.e the one with highest...
1
by: manikandanc | last post by:
if i tying to insert the values in access table not showing any error but also not saving the values in table. plz,Help.
2
by: chetu19800 | last post by:
i need to add manual value by coding and also add name depended on queary how can set row source type are both value and table/query in combo box. example : i like add ALL and other value fill...
1
by: bdavis6290 | last post by:
I have 2 tables' tblRHM and tblRHM1. tblRHM has suploc, penloc, and RHM. tblRHM1 has RHM1, suploc, penloc, fname, lname, mname, dob, address, b1, b2, b3, and uniqueID . I also have a template I would...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.