Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

removing date from database record -

0 views
Skip to first unread message

John L

unread,
Mar 26, 2005, 2:02:09 PM3/26/05
to
Using VB5 and Access 7 database.

Not sure how to describe this problem - but I have 2 text boxes in a
database program - they store a date and the properties in the DB are set as
date/time.

Works fine, but if I choose remove the date, when I restart the program the
date is back filled back in by the database records I assume - can't seem to
get rid of it once it's stored.

I've tried to get the recordset to update with the blank field before the
exiting the program, but that only gives me an error from VB...

Any tips? Can't seem to locate previous comments on this.

TIA - John


AK

unread,
Mar 26, 2005, 5:27:19 PM3/26/05
to

"John L @yahoo.com>" <john_stlmo<removethis> skrev i en meddelelse
news:mvi1e.10141$lk5....@fe06.lga...

When binding a List -or Combo -box to a dataBase
the Clear property is not functioning. I think the
textBox is functioning likewise, that is, you're not
allowed to blank it enthough, I have
no experience with it.


Michael B. Johnson

unread,
Mar 28, 2005, 12:48:24 PM3/28/05
to

You may need to set the date to NULL in your database, whenever the
date typed in is blank AND you are updating the database.

<aircode>
' rs is your Recordset.

If Len(Trim(txtDateField.Text)) = 0 Then
rs.Fields( "MyDateField" ).value = Null
Else
rs.Fields( "MyDateField" ).value = txtDateField.Text
End If

</aircode>

Hope I've understood your issue correctly...
_______________________
Michael B. Johnson

0 new messages