junwebhead
Programmer
Hi all!
I hope that anyone can help me.
What I want to do is this:
When saving...
if the textbox = "", save null value in the date field.
otherwise save the date value.
When retrieving...
if the value in my field is null, put "" in the textbox.
otherwise get the date value and put it in the textbox.
I tried this code but got an error.
I'm using MSAccess 2000. Thanks!
Jun
I hope that anyone can help me.
What I want to do is this:
When saving...
if the textbox = "", save null value in the date field.
otherwise save the date value.
When retrieving...
if the value in my field is null, put "" in the textbox.
otherwise get the date value and put it in the textbox.
I tried this code but got an error.
Code:
myDataRow["ExaminationDate"] = txtExaminationDate.Text == "" ? DBNull.Value : txtExaminationDate.Text;
I'm using MSAccess 2000. Thanks!
Jun