RichardPrewitt
IS-IT--Management
I have the following code in the Object cmdCancelFollowUp and the Procedure Click. The RequireFollowUp, DateOfFollowUp, and TimeOfFollowUp are fields in the underlying 97 MS-Access database. datRequest is a data control on the main form in Visual Basic 6.0. When I run the program, it says that the DateOfFollowUp and TimeOfFollowUp fields cannot be 0 length. I want to Null the fields and can't seem to figure it out.
Any help would be appreciated.
Thanks,
Richard
Code:
If datRequest.EditMode = dbEditAdd Then
datRequest.Recordset("RequireFollowUp").Value = No
datRequest.Recordset("DateOfFollowUp").Value = ""
datRequest.Recordset("TimeOfFollowUp").Value = ""
datRequest.Recordset.Update
Else
datRequest.Recordset.Edit
datRequest.Recordset("RequireFollowUp").Value = No
datRequest.Recordset("DateOfFollowUp").Value = ""
datRequest.Recordset("TimeOfFollowUp").Value = ""
datRequest.Recordset.Update
End If
Any help would be appreciated.
Thanks,
Richard