Blank Space

N

NotGood@All

I have a table with a field named FirstName, all the names starts with a
blank, how do I remove the blank?
 
F

fredg

I have a table with a field named FirstName, all the names starts with a
blank, how do I remove the blank?

You're sure it's a space and not an unprintable character?
Run an update query:

Update YourTable Set YourTable.[FirstName] = LTrim([FirstName])

Change the table name to whatever the actual name is.
 
M

Marshall Barton

NotGood@All said:
I have a table with a field named FirstName, all the names starts with a
blank, how do I remove the blank?


Use the Trim or LTrim function.

If you want to change all the records in the table, use it
in an UPDATE query.

If users are entering the name with the extra space, add
code to the form text box's AfterUpdate event to remove the
space so you won't have the problem again..

If there are names without the extra space then it would be
best to add a WHERE clause to slelect only the records that
have the leading space:

UPDATE table Set FirstName = LTrim(FirstName)
WHERE FirstName Like " *"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top