Removal of Zero lenth String

K

Kay

I understand a zero length string. We have a table of data downloaded from
"who know where" and a lot of the values seem blank and some are, but others
are zero length. Can we programattically or thru any other means, clear the
fields of the "".

Hope I have made myself clear and thanks for your help!
 
A

Allen Browne

Run an Update query.

Here's the basic idea:

Dim db as DAO.Database
Dim strSql As String
Set db = dbEngine(0)(0).Execute
strSql = "UPDATE [Table1] SET [MyTextField] = Null WHERE [MyTextField] =
"""";"
db.Execute strSql, dbFailOnError

You will need to loop through all the text and memo fields in each
non-system table.
 
K

Kay

Thanks so much... I don't know why I did not think about an upate with null
values.

Allen Browne said:
Run an Update query.

Here's the basic idea:

Dim db as DAO.Database
Dim strSql As String
Set db = dbEngine(0)(0).Execute
strSql = "UPDATE [Table1] SET [MyTextField] = Null WHERE [MyTextField] =
"""";"
db.Execute strSql, dbFailOnError

You will need to loop through all the text and memo fields in each
non-system table.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Kay said:
I understand a zero length string. We have a table of data downloaded from
"who know where" and a lot of the values seem blank and some are, but
others
are zero length. Can we programattically or thru any other means, clear
the
fields of the "".

Hope I have made myself clear and thanks for your help!
 

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