I am developing with vb.net 2005 and here is my situation:
Every time I save a date to my access table, it does get saved great, but when I try to retrieve that date, it again populates great, BUT when I do not save a date and leave that date tipe picker field empty, NOW date is displayed. How do I change the code so that of there is not date in access, the fields is left "empty" without today's date.
Thank you
'If Not (IsDBNull(contactreader("D
ate"))) Then
' dtpDate.Text = CType(contactreader("Date"
), Date).ToShortDateString()
' 'Else
' ' dtpDate.Text = Nothing
' 'dtpDate.Text = Nothing
'End If
I also tried:
If Not (IsDBNull(contactreader("D
ate"))) Then
Me.dtpDate.Value = contactreader("Date")
Else
dtpDate.Value = ""
End If
Start Free Trial