I am trying to reset value of date to null and value of weight to null.
I tried the following code, but only weight is being set to 0
and date is not set to null:
Private Sub Form_Load()
Me.Text42.Value = ""
Dim i As Integer
Dim Db6 As Database
Dim Rs6 As Recordset
Dim Trn6 As String
Set Db6 = CurrentDb
Set Rs6 = Db6.OpenRecordset("GoatMasterTable")
Do While Not Rs6.EOF
If Rs6.Fields("Recentweight") > 0 Then
Rs6.Edit
Rs6.Fields("RecentWeight") = 0
Rs6.Fields("RecentWeightDate") = """" Or IsNull(Rs6!RecentWeightDate)
Rs6.Update
End If
Rs6.MoveNext
Loop
Rs6.Close
Set Rs6 = Nothing
Db6.Close
End Sub