>> I have a date/time field in a database field which is usually Null and
>> which I would like to display as blank in a DateTimePickerControl on
>> the form. How do I do that? Even if I uncheck the (optional) check box
>> in the control it displays the default today's date.
>Put the code at the end of this message in the Form's code window and
>see if it does what you want. (I'm not sure if you can adapt this to a
>data-bound DatePicker control or not.) If you want to blank the
>DatePicker contorl within code, say using a CommandButton, put this in
>its Click event.
>Private Sub Command1_Click()
> DTPicker1.Value = vbNull
> FormatDTPicker
>End Sub
>Rick - MVP
>Private Sub Form_Load()
> DTPicker1.Value = vbNull
> FormatDTPicker
>End Sub
>Private Sub DTPicker1_CloseUp()
> FormatDTPicker
>End Sub
>Private Sub DTPicker1_Format(ByVal CallbackField As String, _
> FormattedString As String)
> If CallbackField = "X" Then
> FormattedString = ""
> End If
>End Sub
>Private Sub FormatDTPicker()
> With DTPicker1
> If .Value = vbNull Then
> .Format = dtpCustom
> .CustomFormat = "X"
> Else
> .Format = dtpShortDate
> End If
> End With
>End Sub
>Private Sub DTPicker1_MouseDown(Button As Integer, Shift As Integer, X
>As Single, Y As Single)
> With DTPicker1
> If .Value = vbNull Then
> .Value = Now
> End If
> End With
>End Sub