can you help me this code please?
on a subform I am trying to look at the [en update ] textbox (contains a date),
and if it is within 28 days of the date then it will change the value of textbox [EN update info] to 0
the code I have been trying is as follows but I keep getting an "loop without DO error ,
firstly is my code right for looking at [en update ] and checking the date contained correct?
and what else is wrong with my code please
Private Sub Form_Current()
Dim rs As dao.Recordset
Set rs = Me!subform.Form.RecordsetClone
With rs
If Not (.BOF And .EOF) Then .MoveFirst
Do While Not .EOF
If ![EN update] >= DateAdd("m", 0, Date) And DateAdd("d", 28, Date) Then
Me.en_update_info.Value = 0
.MoveNext
Loop
Exit Do
.Close
End If
End If
End Sub
on a subform I am trying to look at the [en update ] textbox (contains a date),
and if it is within 28 days of the date then it will change the value of textbox [EN update info] to 0
the code I have been trying is as follows but I keep getting an "loop without DO error ,
firstly is my code right for looking at [en update ] and checking the date contained correct?
and what else is wrong with my code please
Private Sub Form_Current()
Dim rs As dao.Recordset
Set rs = Me!subform.Form.RecordsetClone
With rs
If Not (.BOF And .EOF) Then .MoveFirst
Do While Not .EOF
If ![EN update] >= DateAdd("m", 0, Date) And DateAdd("d", 28, Date) Then
Me.en_update_info.Value = 0
.MoveNext
Loop
Exit Do
.Close
End If
End If
End Sub