G
Guest
Thanks in advance for your help...
I am running an update query out of VBA by putting the SQL in a string and
using the DoCmd.RunSQL feature. In particular, I am trying to remove a value
from a date field in a table, without deleting the record as a whole.
I am having trouble finding syntax that will place an empty or null value in
the field, however. I have tried using an empty string "" and a variable with
a null or empty value in it - things that would work for a string - but get
back a data type error.
Here's an example of the kind of things I've written:
UPDATE tblAnyTable SET tblAnyTable.DateValue = ''"
UPDATE tblAnyTable SET tblAnyTable.DateValue = #''"#
UPDATE tblAnyTable SET tblAnyTable.DateValue = '' & datNullVariable & ""
Any suggestions will be very welcome.
Thanks again.
Jake
I am running an update query out of VBA by putting the SQL in a string and
using the DoCmd.RunSQL feature. In particular, I am trying to remove a value
from a date field in a table, without deleting the record as a whole.
I am having trouble finding syntax that will place an empty or null value in
the field, however. I have tried using an empty string "" and a variable with
a null or empty value in it - things that would work for a string - but get
back a data type error.
Here's an example of the kind of things I've written:
UPDATE tblAnyTable SET tblAnyTable.DateValue = ''"
UPDATE tblAnyTable SET tblAnyTable.DateValue = #''"#
UPDATE tblAnyTable SET tblAnyTable.DateValue = '' & datNullVariable & ""
Any suggestions will be very welcome.
Thanks again.
Jake