delete date from date field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created an option box with two radio buttons - 'Complete' & ' Not
Complete, and a text box with for a date (short date format). When the user
clicks 'Complete', the date box is enabled and a date is entered. When they
click 'Not Complete', the date box is disbled, but the date will not delete.
Instead it changes to 12/30/1899. I am using the following code. Could
someone help me code this correctly to remove the date on if 'Not Complete'?

Private Sub Frame67_Click()
If Me.Frame67 = 2 Then
Me.txtFollowComplete2 = False (this is the date text box)
Me.txtFollowComplete2.Enabled = False
End If
End Sub

Mary Beth
 
In ACCESS, the value of the False constant is 0. That is why you see
12/30/1899 in the date textbox -- a date value of 0 is December 30, 1899.

Use Null instead:

Private Sub Frame67_Click()
If Me.Frame67 = 2 Then
Me.txtFollowComplete2 = Null
Me.txtFollowComplete2.Enabled = False
End If
End Sub
 
Back
Top