Removal of Zero lenth String

  • Thread starter Thread starter Kay
  • Start date Start date
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!
 
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.
 
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!
 
Back
Top