removing spaces in field

R

Ramesh

Is there a way all the spaces entered in a field?

Also i have some fields where the asterisk characters have been entered.
How do i remove the asterisk marks?

Thanks for any help

Ramesh
 
K

Ken Snell \(MVP\)

Are you wanting to do this after data have been entered in a textbox on a
form? Or do you want to clean up data that are already in a table?
 
R

Ramesh

sorry, realised my question missed some words and hence incomplete.

i have a field with telephone numbers entered with spaces. i need to remove
those spaces in the entries.

also i have some fields which just contain the asterisk symbol. i need to
replace those fields simply with a Null.

Thanks Ken for your help. The data is already entered and i am cleaning up.

Ramesh
 
G

Guest

Your answer is within your question.
Use the Replace function

Replace([FieldName]," ","")
Replace([FieldName],"#","")
 
K

Ken Snell \(MVP\)

Run an update query on the table (caution: make a backup copy of the
database file first):

UPDATE TableName
SET FieldName = Replace(Replace(FieldName,
" ", "", 1, -1, 1), "*", "", 1, -1, 1);

--

Ken Snell
<MS ACCESS MVP>
 

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