In an old VB6 program, I have a data control associated with text controls on a form. Some of table fields are datetime fields in the JET database.
There is no default value for the datetime fields, so when first displayed on the form they show up as blank. When they are eventually set, the text string is validated as a date and the data control duly updates the record.
If the user desires to erase the date (e.g., correction of prior data entry) they simply blank the field. No error occurs on the save, but the affected datetime fields are not updated. When the record is viewed again, the last entered date is visible.
Upon examination of the DataChanged property of the text control, I can see that the date value has changed to blank (= cNullString).
Therefore, I am assuming that the eventual save of the record ignores the cNullString because it considers it invalid for a datetime field.
When my user enters blank, how can I force the datetime field back to nothing so that the next time it is viewed it will be blank again?