removing spaces in field

  • Thread starter Thread starter Ramesh
  • Start date Start date
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
 
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?
 
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
 
Your answer is within your question.
Use the Replace function

Replace([FieldName]," ","")
Replace([FieldName],"#","")
 
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>
 
Back
Top