i have a DB with a form in it that has many text fields. i have a command button on this form that can clear all data entered in these text boxes, but not delete the record itself. below is an example of my VBA coding:
Private Sub Clear_Current_Record_Click()
Dim intResponse As Integer
intResponse = MsgBox("Are you sure you want to Clear all fields in current record?", vbYesNo, Change)
If intResponse = 6 Then
Me.Text1.Value = " "
Me.Text2.Value = " "
Me.Text3.Value = " "
Me.Text4.Value = " "
Me.Text5.Value = " "
Else
End If
End Sub
problem is, Text 5 is a date formatted field (__/__/____). i get a run time error of 2113, "The value you entered isn't valid for this field."
help on this problem would be appreciated.
Thanks!
Private Sub Clear_Current_Record_Click()
Dim intResponse As Integer
intResponse = MsgBox("Are you sure you want to Clear all fields in current record?", vbYesNo, Change)
If intResponse = 6 Then
Me.Text1.Value = " "
Me.Text2.Value = " "
Me.Text3.Value = " "
Me.Text4.Value = " "
Me.Text5.Value = " "
Else
End If
End Sub
problem is, Text 5 is a date formatted field (__/__/____). i get a run time error of 2113, "The value you entered isn't valid for this field."
help on this problem would be appreciated.
Thanks!