Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to Null a field to an underlying Access DB

Status
Not open for further replies.

RichardPrewitt

IS-IT--Management
Apr 16, 2002
57
US
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.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top