Urgent :Store null date into table
I have a field called dte which is a datetime type and allows null.
But I can't insert a null date into it. I found out that dte only stores "1/1/1900", but not null
.........
.........
drp = " " (I also tried drp = null, but it can't work)
sql = "Insert Into Cus_TBL Values " & _
"('" & Trim(txtID.Text) & "','" & _
Yr & "','" & drp & "')"
Please help me !
It's urgent !!!
Re: Urgent :Store null date into table
Try drp without apostrophies around it
...Yr, drp & ")"
Iouri Boutchkine
[email protected]
Re: Urgent :Store null date into table
Re: Urgent :Store null date into table
try this
sql = "Insert Into Cus_TBL Values ('" & Trim(txtID.Text) & "','" & Yr & "',"
if drp = "" then
sql = sql + "NULL"
else
sql = sql + '" & drp & "')"
end if
msgbox sql