PDA

Click to See Complete Forum and Search --> : nullify date field


pardede
May 23rd, 2000, 09:13 AM
I notice that if a date-field already has data in it, and a user wants to delete this date (empty the textbox for example), I cannot actually delete the date in the database, i got an error implying that the data i'm trying to put (null) is invalid for the field.

Anyone knows how to do this?

(BTW i use vb5)

[Edited by pardede on 05-24-2000 at 04:14 AM]

Stevie
May 23rd, 2000, 04:25 PM
When updating the record you could have a line of code along the following lines :


rs!SomeDate = IIf(TextBox.Text = "", Null, TextBox.Text)

Works for me with an Access database.

Hope this helps :)