whitespace at end of data

  • Thread starter Thread starter jez123456
  • Start date Start date
J

jez123456

Hi Experts

I have a table with the following user_names

"Bill"
"Fred"
"Andrew"
"Fred "

As you can see, there are 2 Freds (one without a space at the end, and one
with a space at the end).

How do I select one and not the other?
 
Hi Experts

I have a table with the following user_names

"Bill"
"Fred"
"Andrew"
"Fred "

As you can see, there are 2 Freds (one without a space at the end, and one
with a space at the end).

How do I select one and not the other?

Hello,

Question: are you sure second "Fred" has space after its name? Can you
open table and check that?

Regards,
Branislav Mihaljev
Microsoft Access MVP
 
In most cases, Access will strip out any trailing spaces when it stores the
data. IT is possible to get trailing spaces if the data is input via other
means then the keyboard and it is possible to have trailing spaces if you are
linking to other data sources - Excel, MS SQL server, etc.

Are you trying to find names that end in one (or more spaces)?
Field: User_Names
Criteria: Like "* "

With No space at the end
Field: User_Names
Criteria: NOT Like "* "

Or even
Field: User_Names
Criteria: Like "*[! ]"

Or
Field: Right(User_Names,1)
Criteria: = " "

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
Back
Top