vba to update empty string

griffins69

griffins69
Local time
Today, 07:22
Joined
Apr 15, 2010
Messages
18
Modifying the empty string does not work for me. My 1st string works perfect.......What am I doing wrong with the 2nd string?


str_SQL = "Update tbl_078 Set Program_Type ='Both' where Program_Type = 'tttt'"

str_SQL1 = "Update tbl_078 Set Program_Type ='Both' where Program_Type = ''"
 
str_SQL1 = "Update tbl_078 Set Program_Type ='Both' where IsNull(Program_Type);"

or

str_SQL1 = "Update tbl_078 Set Program_Type ='Both' where Program_Type Is Null;"
 
thanks

I don't why i didn't use null
 
well, its never apparent that a value is null, and not ""

you cant see any difference, can you?

null's are often a pain - they complicate lots of things.
 

Users who are viewing this thread

Back
Top Bottom