Spaces

M

Metalteck

When I query a database with fields such as the first and last names, the
results I get are both names, with a large amount of space after each of
them. Is there a way to get rid of these spaces?
 
K

KARL DEWEY

I expect the first and last names are in different fields and the space you
are talking about is the field display separation on the screen.
You can concatenate the name like --
[FirstNameField] &" " & [LastNameField]
OR --
[LastNameField] &", " & [FirstNameField]
 
D

Douglas J Steele

Actually, if your tables are in another DBMS (such as SQL Server), the text
fields may be fixed length.

If that's the case, you'd want

RTrim([FirstNameField]) &" " & RTrim([LastNameField])
-- OR --
RTrim([LastNameField]) &", " & RTrim([FirstNameField])


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


KARL DEWEY said:
I expect the first and last names are in different fields and the space you
are talking about is the field display separation on the screen.
You can concatenate the name like --
[FirstNameField] &" " & [LastNameField]
OR --
[LastNameField] &", " & [FirstNameField]

Metalteck said:
When I query a database with fields such as the first and last names, the
results I get are both names, with a large amount of space after each of
them. Is there a way to get rid of these spaces?
 
Top