Blank Field

  • Thread starter Thread starter Guest
  • Start date Start date
Perhaps it is better to say that I want to fill up the blank field with
something using
"Replace" function.

Thanks
 
Baz said:
Replace with what?



Perhaps it would be better to say that I want to fill up the blank field with something using the Repalce function
 
AlanW said:
Perhaps it is better to say that I want to fill up the blank field
with something using
"Replace" function.

The Replace function is for replacing a "piece" of a string with some other
piece. To fill an empty field with a value all you need is a straight update
query.

UPDATE TableName
SET FieldName = "SomeValue"
WHERE FieldName Is Null
 
UPDATE MyTable SET MyField = Replace([MyField], " ", "_")

will replace all blanks in the field MyField with underscores, whereas

UPDATE MyTable SET MyField = Replace([MyField], " ", "")

will simply remove all the blanks from the field.

To do this through the graphical query builder, create an Update query as
normal, and put

Replace([MyFIeld], " ", "_")

in the "Update To:" row in the MyField column.
 

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

Back
Top