This question was posted once but I couldnot get any solution.
I have a form with textboxes bound to a dao. one textbox is bound to date field. Now if user doesnot
write into the field, and then presses the update buton (i use dao form wizard)then the record is saved
without any problem and the date field shows null. But if the user enters a text into date field but
then realises that he shouldn't be entering it, and then if he deletes whatever he has entered in the field
and then presses update button, dao gives data type mismatch error. 'Not required' is ticked in database
field during design.
what do i do ?
I tried using dao.recordset.fields("date")=null to set the field to null before saving it.
But dao gives me an error saying that, "update without edit or cancelupdate" when i use dao.recordset.update method.
This nulling method works if I use .edit method before the user changes any data. But, I do not have control on it since, when a user changes a textbox, it is the dao that handles the editing, and not me.
I cannot upgrade to ado.