If i didn’t place any date in the textbox ,system is capturing 1/1/1900 by default insted of Null.How can i get rid of this.
cmd.CommandText = “Update FormMaster set BriefingDate ='” + TextBox7.Text + “‘
where FormID =” & Val(AutoID.Text)
cmd.ExecuteNonQuery()
Thank You
i would recomend that you specifically check the value of TextBox7 before and assign to a var, so if the date is correct assign the value “‘” + TextBox7.Text + “‘” else just assign NULL.
this would lead to statement being UPDATE TABLE SET DATE = NULL if required OR UPDATE TABLE SET DATE = ‘DATE’ otherwise