Results 1 to 2 of 2

Thread: nullify date field

  1. #1

    Thread Starter
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    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]

  2. #2
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    When updating the record you could have a line of code along the following lines :

    Code:
    rs!SomeDate = IIf(TextBox.Text = "", Null, TextBox.Text)
    Works for me with an Access database.

    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width