Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spacing Question on Formatting Name 2

Status
Not open for further replies.

kentwoodjean

Technical User
Oct 19, 2002
376
US
I have a couple of questions if someone could answer them for me please. Courious minds need to know.

I have one table (employees) with fields of LastName and FirstName. In my query, I use NAME: [LastName] & ", " & [FirstName] with a result of Doe,Jane.

In another table (WMS)I have fields EMPLSTNAME and EMPLSTNAME. In my query for this table I use:
Name: [EMPLSTNAME] & ", " & [EMPFSTNAME] with a result of
DOE, JANE.

There is a large space appearing in the 2nd situation between the 2 components of Name. (1) Why does one space as it should while the other does not? Is it because of the Capital letters? If so, how do you fix that?
 
It is not because of the capital letters. I suspect data has been entered or imported with leading spaces. You can use the trim function:

Name: Trim([EMPLSTNAME])& ", " & Trim([EMPFSTNAME])

 
Code:
[b]FullName:[/b] Trim([EMPLSTNAME])& ", " & Trim([EMPFSTNAME])
Name is a reserved word in Access. See List of reserved words in Access 2000

________________________________________________________
Zameer Abdulla
Help to find Missing people
My father was a realistic father; not a vending machine dispense everything I demanded for!!
 
You are probably right in that the importing process is probably the problem. It is good to know there is a way around it and "trim" is another new thing that I have learned. I have wondered why this has happened for a long time and glad to know the answer.

Thanks for both your responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top